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

Post bugs related to the IDE here
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

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

Post 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.
#NULL
Addict
Addict
Posts: 1499
Joined: Thu Aug 30, 2007 11:54 pm
Location: right here

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

Post 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.
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

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

Post by Dude »

Confirmed for 5.62 (x86). Nice catch! :)
hoerbie
Enthusiast
Enthusiast
Posts: 137
Joined: Fri Dec 06, 2013 11:57 am
Location: DE/BY/MUC

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

Post 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 ;-)
Post Reply