In the GTK2 version of geany (up to version 1.36), each time the Find dialog is (re-) opened by pressing Ctrl-F, the search text entry box is empty.
I recently moved to Geany 1.38 with GTK3, and this is no longer true. Each time I search for something, and then close the Find dialog, and then re-open it again, the previous search text is still there.
I have checked in Preferences -> General -> Miscellaneous -> Search and I don't see any option to disable this behaviour. Would you please consider to add this feature in future builds? Usually when one opens a Find dialog, they want to find something else, not the previous search text (or otherwise they could have used Ctrl-G for that purpose).
Apologies if this feature is already implemented and I'm just too blind to see where this can be configured.
Thank you.
There are various discussions around the issue, you can search closed issues/PRs if you want, but bottom line is that the current behaviour is intended and desired:
1. if there is a selection, use that 2. else if the cursor is in a word, use that 3. else last search
This happens if Ctrl+f is pressed to open the dialog or pressed to reload the search text with the dialog open.
But the search text is selected when the dialog is opened, or the text is reloaded, so just start typing and its replaced by your typing, or one keystroke (backspace or delete) will remove all the contents.
I doubt that this is going to be changed.
Closed #3519 as not planned.
This happens if Ctrl+f is pressed to open the dialog or pressed to reload the search text with the dialog open.
But the search text is selected when the dialog is opened, or the text is reloaded, so just start typing and its replaced by your typing, or one keystroke (backspace or delete) will remove all the contents.
That would be great if it is true, but it is not. The text in the search entry isn't selected. It is left exactly where it was including the cursor position, etc. So one has to be mindful where the cursor is. At the very least, one has to select the search text, and then delete it, and then start typing the new search term.
1. if there is a selection, use that 2. else if the cursor is in a word, use that 3. else last search
I agree that 1 and 2 are useful in their context. And nicely they have switches to control whether to enable this or not, because, it's not always useful (one doesn't always want to search automatically based on the selection or the word under cursor). I just wish that they have switch for no 3 too.
It probably changed post 1.38, I'm using b143e481e or later.
You're right, it's not geany. It's GTK, specifically, the default GTK theme that I used, that specifically disables select-on-focus. Thanks for pointing me to the right direction.
github-comments@lists.geany.org