Page 1 of 1

IDE "Find Next" skips next after deletion of match selection

Posted: Thu Jul 19, 2018 9:51 am
by Mistrel
Find part of the prefix (#PREFIX_, REFIX_, PREFIX) and delete it with backspace or delete. Hit F3 to find next and it will skip the next selection and jump to the one after that.

Example:

Code: Select all

| <- pipe is position of cursor
#PREFIX_A
#PREFIX_B
#PREFIX_C
#PREFIX_D
#PREFIX_E
#PREFIX_F
#PREFIX_G
Find "PREFIX_", backspace, F3

Code: Select all

#|A <- pipe is position of cursor
#PREFIX_B
#[PREFIX_]C
#PREFIX_D
#PREFIX_E
#PREFIX_F
#PREFIX_G <- brackets show next selected match after F3
Some search strings (FIX_, and EFIX_) do not demonstrate this behavior and find/match next correctly.

Re: IDE "Find Next" skips next after deletion of match selec

Posted: Thu Jul 19, 2018 11:42 am
by #NULL
Confirmed with pb570b1 x64 Linux
Alternating F3 and DEL/Backspace will find/delete every second occurrence.

Code: Select all

#_A
#PREFIX_B
#_C
#PREFIX_D
#_E
#PREFIX_F
#_G
And it works correctly with some search strings.

Re: IDE "Find Next" skips next after deletion of match selec

Posted: Thu Jul 19, 2018 12:33 pm
by Dude
Confirmed for 5.62 (x86). Nice catch! :)

Re: IDE "Find Next" skips next after deletion of match selec

Posted: Fri Jul 20, 2018 8:45 am
by hoerbie
I think the saved pointer of "from where to start next search" is simply set to "behind" the last found match. If you then delete this match, the pointer is simply behind the next match. Taking a look that the CR+LF behind each line and counting the chars with CR+LF, it is clear for me, that PREFIX_ and PREFIX don't work but PREFI works, because there are enough chars between the last and the next match.

You can see this with another search, please put in the IDE:

#ABCABCABCABCABCABC

and search for ABCABC, you will get
#[ABCABC]ABCABCABCABC <- [] marks the first match
#ABCABC[ABCABC]ABCABC <- [] marks the next match
#ABCABCABCABC[ABCABC] <- [] marks the last match

Other editors would start with their matching
#[ABCABC]ABCABCABCABC <- [] marks the first match
#ABC[ABCABC]ABCABCABC <- [] marks the next match
#ABCABC[ABCABC]ABCABC <- [] marks the next match
#ABCABCABC[ABCABC]ABC <- [] marks the next match
#ABCABCABCABC[ABCABC] <- [] marks the last match

We can discuss now, if it is a bug or a feature ;-)