Geany starts searching for the next occurrence from the _end_ of the current 
match, so yes it will not find overlapping matches.

Functions associated with search such as:
-  "mark all" has to work this way, there is no way of marking overlapping 
occurrences so they can be distinguished. 
- "replace all" similarly has to look from the end of the text being replaced 
otherwise it might change the new substitution (and I vaguely remember a bug 
something like that back in the Geany mesolithic)
- regular expressions should start from the end otherwise greedy expressions 
like `a+` would be found four times in `aaaab` if it restarted from the next 
character, `aaaa`, `aaa`, `aa`, `a` and that is not likely to be what the user 
expects and in fact could be quite annoying

And to be consistent all searches do the same thing, start from the end of the 
previous match.  

All other editors and IDEs I have installed (Xed, Gedit, Vscode) all work this 
way too.

This is a useful and safe way to behave for the general use-case as a code 
editor where overlapping strings are unlikely to be relevant.

Therefore this is not considered a bug.  

If someone really needed the overlapping search capability they could add it in 
a plugin.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/3932#issuecomment-2282937476
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/issues/3932/[email protected]>

Reply via email to