Allow for specifying whether to select the search input content when activated #3

Closed
marcuswestin wants to merge 1 commit from main into main
marcuswestin commented 2021-09-03 22:17:24 +02:00 (Migrated from github.com)

Problem: When I use the search panel multiple times, previous search input isn't cleared on subsequent searches.

This patch addresses this problem by adding a "select" option to the search config.

Steps to demo intended behavior

  1. Hit Cmd+f
  2. Type in "foo". Editor correctly finds "foo"
  3. Hit escape
  4. Hit Cmd+f
  5. Type in "bar". Editor finds "foobar" instead of my expected "bar".

Adding the option "select" means that the previous content "foo" is selected by default when focusing on the search input with Cmd+f, so typing "bar" overrides the previous input.

Problem: When I use the search panel multiple times, previous search input isn't cleared on subsequent searches. This patch addresses this problem by adding a "select" option to the search config. Steps to demo intended behavior 1) Hit Cmd+f 2) Type in "foo". Editor correctly finds "foo" 3) Hit escape 4) Hit Cmd+f 5) Type in "bar". Editor finds "foobar" instead of my expected "bar". Adding the option "select" means that the previous content "foo" is selected by default when focusing on the search input with Cmd+f, so typing "bar" overrides the previous input.
marcuswestin commented 2021-09-04 17:47:08 +02:00 (Migrated from github.com)

I need to merge additional content into the wordflower:main branch, and so I'm going to close this pull request and then open a new one from a specific feature-branch (named "add-search-config-to-not-match-case")

I need to merge additional content into the wordflower:main branch, and so I'm going to close this pull request and then open a new one from a specific feature-branch (named "add-search-config-to-not-match-case")

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
codemirror/search!3
No description provided.