I think there is some middle ground here.

The Edit->Preferences->General->Miscellaneous panel already sports an option 
named "Use the current word under the cursor for Find dialogues".  If that 
option is checked, when you press Ctrl-F and nothing is selected, if the Find 
dialogue is not already visible the "word" under the cursor is populated into 
the Find box.  If the above option is unchecked, when you press Ctrl-F and 
nothing is selected, if the Find dialogue is not already visible the Find box 
is not re-populated, so either nothing is there (on first usage) or the 
previous search string is still there.

Now if the behaviour is changed to allow the Find box to be populated by Ctrl-F 
even when the Find dialogue is already visible, the "Use the current word under 
the cursor for Find dialogues" option may be used to determine if the Find box 
is re-populated or not.  If nothing is selected, the Find box retains its 
contents on Ctrl-F, unless "Use the current word under the cursor for Find 
dialogues" is checked and the it would be the current "word".  If something is 
indeed selected, then the Find box is re-populated irrespective of the "Use the 
current word under the cursor for Find dialogues" setting.

In this manner (i.e. with the proposed modification), if the Find dialogue 
remains visible and you return to the edit window to perform some operations 
and then press Ctrl-F, the search string in the FInd box will not change unless 
you selected some text and then pressed Ctrl-F.

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/758#issuecomment-180276085

Reply via email to