When using the Find tool dialog box, when you get to the last instance of that keyword found, another dialog box opens asking user if they want to "Wrap search and find again", if user chooses to do so by hitting the "Find" button it then wraps the search starting again from the top (first instance it found of that keyword). The problem with this is that if you hit your "Enter" key again to go to the next instance of that keyword, you will realize (hopefully) that the Find dialog no longer has focus and that that "Enter" key you have just it ended up modifying the text in the file you are in. Would it be possible, to program Geany so that when the "Wrap search and find again" is choosen to be find again, to give the focus back to the "Find" dialog box instead of giving the focus to Geany instead? I know that windows/dialogs in Linux can be tricky, if this is not possible, please let me know and I will close this issue post.
For now the best solution is to go into `Preferences - General - Misc - Search` and check `Always wrap search` This does fix the issue but then you can get into one of those situations where you keep cycling through found keywords over and over to then realize you were just in a loop :) So the notification that you have come to the last keyword instance can be helpful.
Geany does not have any indications for keywords found, no text # of # found or indicators that show up in vertical scrollbar like some programs include. I recommended some ideas in the "Ideas" section in "Discussions" about this but apparently coding wise this is not possible. So losing this dialog indicator with the solution mentioned above helps but is not desired because can cause some issues.
Thank You
Possibly the wrap dialog should refocus the find dialog on acceptance on the wrap dialog, "somebody" providing a good PR would likely be accepted.
As was mentioned in #4007 Geany only finds __ONE__ match at a time.
When the search is started it begins at the cursor when the find dialog is opened and stops at the first match it finds.
If the find dialog remains focussed the match remains valid because no file contents can change, so find starts from the start/end of the match when the previous/next button is triggered.
But Geany allows a user to edit contents by fosussing the editor while the find dialog is still open. That means that any match the search had might not be valid any more, so the find again starts at the cursor when previous/next is selected.
In each case a single search has a start point, there is no sequence, the search either finds the previous/next match or it finds no match between the start point and wrap to the start point again. The only point is the point the particular search starts with, not a sequence that might represent a loop.
The scrollbar issue has been addressed in #4008, and the counts have been addressed in #4007, don't keep repeating them, it won't change the answer.
Closed #4021 as completed via #4096.
github-comments@lists.geany.org