Notepad3 icon indicating copy to clipboard operation
Notepad3 copied to clipboard

Search skips text

Open tspivey opened this issue 2 years ago • 9 comments

  1. Put this in a text file:
1
2
22
  1. Press ctrl+home to get to the top of the document, and ctrl+f to search.
  2. Type: 2, enter and escape.

I expect the cursor to be on the second line, but am on the third. Version: Notepad3 5.21.1129.1 X64.

tspivey avatar Jan 03 '22 10:01 tspivey

3. Type: 2, enter and escape.

For me, it seems working as expected ? 🤔

  • Press Ctrl+home and Ctrl+F to search. --> the cursor is on line 1
  • Type: 2 --> the cursor jumps on line 2
  • Then enter = Find Next --> the cursor goes on line 3

hpwamr avatar Jan 03 '22 11:01 hpwamr

Typing a search pattern tries to find and display the first occurrence of the search pattern from current (caret) position while not changing the search start position. This allows to preview findings and correct typed search pattern. Activating editor window (clicking title-bar or ESC) will select this first finding, pressing Enter is same as pressing Find Next button (the default button) - jumping to the next finding. So this is expected correct behavior.

RaiKoHoff avatar Jan 03 '22 11:01 RaiKoHoff

Thanks for the explanation. I'm using a screen reader, and this wasn't obvious at all. Is there some way to disable this?

tspivey avatar Jan 03 '22 11:01 tspivey

There is no option to disable the "jump preview" behavior. What is problem with the workflow, leaving out the Enter step, before pressing ESC ?

RaiKoHoff avatar Jan 03 '22 14:01 RaiKoHoff

I want to search for test. I know it's somewhere in the file. In Notepad2, I can press control f, test, enter. I will either be moved to the next test, or hear the beep and get the dialog indicating that my text is not found, without moving.

In Notepad3, I press control f and type. My cursor may or may not move, depending on whether the text is found somewhere further in the file. If I want to know if my text is not found, I can't rely on the sound. I have to press escape, then figure out where my cursor is. Did it move? Great, I'm where I wanted to be. If not, my text is not found and I have to try again. If I start a search and don't want to move after all, I have to remember to clear the text before pressing escape, because this dialog redefines it as move to the first result found if there's something in the box. It's just not a very good experience to try to search like this.

If I want to search backward, say I type def into the box, I press Alt+p. Except I now have to figure out whether there is another function further down through my document before I know where I'm going to end up.

tspivey avatar Jan 03 '22 21:01 tspivey

In Notepad3, if you press Ctrl+F and type something, the cursor moves down to the first occurrence of a search and the "Statusbar" of the Find/Replace dialog shows the number of occurrences in your text. If you just press "Esc", the cursor is placed at the start of the search occurrence. If you press "Enter", the cursor jumps to the next search occurrence.

2022-01-04_092553

hpwamr avatar Jan 04 '22 09:01 hpwamr

Hello @tspivey s,

Feel free to test the "BETA/RC PortableApps", version "Notepad3Portable_5.22.217.2_beta.paf" or newer, see 1st list in issue #1129.

"Notepad3Portable BETA/RC PortableApps" version can be used with or without ".7z" extension.

Also, feel free to test the "BETA/RC Setup", version "Notepad3_5.22.217.2_beta_Setup" or newer, see the 2nd list in issue #1129.

Comments and suggestions are welcome... 😃

hpwamr avatar Feb 17 '22 20:02 hpwamr

Feature Request: F/R Dialog switchable "search on typing" feature and sound when not found ?

RaiKoHoff avatar Sep 01 '22 09:09 RaiKoHoff

Hi, Any updates on this issue? I'm a blind Notepad3 user, and being jumped to the first search result is extremely annoying, for all the reasons outlined by @tspivey above. A toggle would be very nice.

TheQuinbox avatar Jan 16 '23 22:01 TheQuinbox