I am really enjoying using Geany and congratulate you on its richness of functions but there is one thing that makes me curse: I have to close the "find" pop-up dialog each time that I select a new area of text to find and then re-open it by clicking "find" or ctrl-f.
I have been used to using TexPad which re-writes the new find text each time without having to close the pop-up.
Thank you for your great efforts.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/758
I don't supposed you just missed the option to not close it?
![finddialog](https://cloud.githubusercontent.com/assets/181177/11165814/a84d4ace-8acf-11e...)
It's hidden under the collapsed +/- symbol that is circled.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/758#issuecomment-156745791
That option doesn't appear to do anything. It certainly doesn't appear to enable the find text to update.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/758#issuecomment-156757898
No the find text doesn't update. That is to support the use-case:
1. find something 2. do some editing, which may involve selecting 3. find again, still having the original find text available.
Clearly both use-cases cannot co-exist at the same time unless some option is available to choose, though that may not be very convenient, but "somebody" could try implementing it to see.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/758#issuecomment-156758123
I must've misunderstood your problem. That option prevents the Find dialog from closing when you do an "All" operation.
Is your problem that the text in the "Search for:" text box is not updated when you press `<ctrl>f`?
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/758#issuecomment-156758131
- find again, still having the original find text available
Though even if it updated, the original text would be remembered in the drop-down combo box.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/758#issuecomment-156758170
Is your problem that the text in the "Search for:" text box is not updated when you press <ctrl>f?
Yes.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/758#issuecomment-156759808
You have to close the pop-up and open it again to make the new find text appear in it.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/758#issuecomment-156760168
find again, still having the original find text available
Though even if it updated, the original text would be remembered in the drop-down combo box.
But you can't just select "next", you have to notice your search text changed, and go select from the combo box.
I'm not saying this use-case isn't a useful one, just that the system is set up for a different one and I don't see how they can co-exist without one or the other doing extra steps. But suggestions are welcome.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/758#issuecomment-156762942
This could easily be catered for with an option which would either use the current use-case, or the one where the Find dialogue can be updated even when it is visible. By adding an option to, say, the Search section of the Edit, Preferences, General, Miscellaneous box, the user could choose update/don't update Find when visible. If used with the "Use the current word under the cursor..." option deselected, the Textpad functionality (which I find more useful as well) can be achieved. If this is considered an acceptable solution, I'll look at making the change. What say you?
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/758#issuecomment-179502622
Wouldn't it be better to have the option on the find dialog, so it can be selected per search, rather than having to dig in the prefs?
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/758#issuecomment-179522021
Yeah, I considered that, but I thought it would clutter the Find dialogue. In addition, I think this is the sort of setting you set and forget, but maybe that's just me...
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/758#issuecomment-179523739
I don't see how they can co-exist without one or the other doing extra steps
If the default was changed to update the text (seems more convenient in general), it would only be one extra keypress to get to the previous search string, if that's what someone was after (focus starts on combo box, arrow to access previous item from history).
[...] clutter the Find dialogue. In addition, I think this is the sort of setting you set and forget
I tend to agree. I think you could probably just change the current behaviour and anybody that even noticed would be pleasantly surprised, but for the unlikely case that someone prefers the fixed search string, you could just add a "Various" preference to make it not update the search string.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/758#issuecomment-179560038
Personally I think I would actually use both options, thats why I suggested the find dialog. I do lot of find, edit, find next, edit, find next, edit ... but I can see the other case is also useful, everyone's use-case is different. So why not make it more flexible, why force users to decide one use-case or the other? Flexibility makes it a win for everybody.
*If* it not on the find dialog, we should get out of the habit of putting everything in the "various" prefs, there is space in General->Miscellaneous and it already has search settings. So, as was originally proposed, thats where it should go if its not in the dialog.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/758#issuecomment-179563524
If it not on the find dialog, we should get out of the habit of putting everything in the "various" prefs
+1
there is space in General->Miscellaneous and it already has search settings.
-1
IMO, we should get out of the habit of adding a pref at all every time we make a change. Not that I'm opposed to giving the user more control/options, I just don't think it's required to add a pref every time a bug is fixed.
Either way, I don't really care though, I've gotten in the habit of working around the current (mis-)behaviour by, whenever using Ctrl+F, just doing Ctrl+C before hand and Ctrl+V afterwards so the search text is always updated. I just don't think it would be a big deal for anyone wanting the current behaviour for whatever reason to have to press the arrow key once.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/758#issuecomment-179900679
IMO, we should get out of the habit of adding a pref at all every time we make a change. Not that I'm opposed to giving the user more control/options, I just don't think it's required to add a pref every time a bug is fixed.
This is not a bug, Geany operates as it is supposed to. Adding an additional behaviour is not fixing a bug.
press the arrow key once.
that moves the cursor down, the find dialog is not focussed if the user has been editing, and pressing `ctrl-g` does a next search without focussing the find dialog.
Clearly there is a disagreement about usage, so we don't just cut one usage off by hard coding another.
Clearly this has just become an argument between the two of us, and it will be up to someone else to advise the OP what is most likely to be accepted.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/758#issuecomment-180078497
This is not a bug, Geany operates as it is supposed to. Adding an additional behaviour is not fixing a bug.
Yeah, it's not a bug, but it's almost surely an "unfinished" (un-fleshed-out?) feature. I suspect nobody intentionally developed it and tried keeping the search string up to date and decided to remove it in favour of the current behaviour. More likely they got it working updating the search text the first time and never thought about the use case of searching again with dialog open, or maybe the search dialog was initially modal/one-shot and updating it again made no sense.
But anyway, my point was more generally that every time someone proposes an improvement, doesn't necessarily mean we need to add a preference to retain the old behaviour.
that moves the cursor down
It selects the previously searched string from the combo box when you do a find (Ctrl+F), which, IIUC is where this improvement is wanted (at least it is for me).
Clearly there is a disagreement about usage
I don't necessarily disagree about the find usage, I'm just trying to understand the use case where the proposed behaviour wouldn't be wanted, and if it wasn't wanted, and there is an actual use-case for only updating the search string the first time but no times after, what's wrong with just pressing the down arrow after Ctrl+F to use previous search string.
I don't have a lot of programs installed here, but out of curiosity I did a quick survey:
- Firefox updates the search string - Unsurprisingly Thunderbird too - QtCreator does too - And Gedit - KWrite - Konsole - Mousepad has an open bug report to implement it (it doesn't even update it the first time). - Sublime Text has two different keybindings; one updates the search string one never does. - Quassel (my IRC client) doesn't update it
In any case, I don't really care that much about adding a preference. My opinion would be to not have it in the Find dialog for the reasons mentioned by @dmap-guru.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/758#issuecomment-180153642
Your historical speculation is just that, and since neither of us was involved back then who knows and anyway its irrelevant.
But anyway, my point was more generally that every time someone proposes an improvement, doesn't necessarily mean we need to add a preference to retain the old behaviour.
Of course not, we need to look at each case on its own merits, and in this case both the behaviours are useful so being able to chose is also useful.
I'm just trying to understand the use case where the proposed behaviour wouldn't be wanted
That is explained in a previous post.
My opinion would be to not have it in the Find dialog for the reasons mentioned by @dmap-guru.
Well, unless @b4n states a strong preference either way, then @dmap-guru gets to choose which is implemented.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/758#issuecomment-180162468
That is explained in a previous post.
Not really why the search history list is insufficient though. The OP gives an anti-use-case. I would state the usefulness for this enhancement more positively as:
It's convenient to leave the find dialog open since it's non-modal (similar concept of popular find bars in-window). When you are about to search for something, it's helpful when it can automatically be the term you're focussed on/cursor at/selected (Geany even does it for you if you press Esc to hide the dialog before performing next search). Sometimes I want to re-find the same thing as I did last time when I press Ctrl+F, so it's helpful that Geany keeps a search history right in the search text field so after I press Ctrl+F, I can use the arrow keys to navigate through my previous searches, causing only one-keystroke to bring up my last search. Geany is smart enough to only add words I actually searched for to the history so it doesn't get clogged with stuff I never wanted to search for that it filled in automatically.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/758#issuecomment-180166570
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
@dmap-guru thats sounds like a better proposal, if something is selected when the find dialog is re-activated then the new selection is used for the search text, rather than setting the search text any time there is a selection made with the dialog open.
I'm not sure it should be tied to the existing setting, since on re-activation it does not "use the word under the cursor" but a "Replace search text with selection on dialog activation" or some such setting would describe it better. Then again it may not need a setting since you must leave something selected on re-activation to trigger it. And it probably could also work on find-next, find-previous as well.
By the way @codebrainz pointed out on IRC that there are existing "Find next/previous selection" menu items, and although they are not bound to keys by default, you can do so. I am not sure how much of the original posters use-case that covers but it would seem to do a lot of it.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/758#issuecomment-180285474
If this is the way to go, it's a 1 line mod. In search.c, function search_show_find_dialog(), change line:
if (! gtk_widget_get_visible(find_dlg.dialog) && sel)
to
if ( sel )
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/758#issuecomment-180292056
@dmap-guru you forgot to document the behaviour in the manual, that should take several lines :)
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/758#issuecomment-180303791
LOL
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/758#issuecomment-180326634
rather than setting the search text any time there is a selection made with the dialog open.
I must be missing something, when was this ever proposed behaviour? Unless I'm completely missing the point of this Issue, the goal is to do exactly what it does when the find dialog is hidden, that is, when you press Ctrl+F, the current word under cursor/selection gets filled in the search field. The only difference is that it would do it every time you press Ctrl+F, not just if the search dialog is hidden.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/758#issuecomment-180552110
Clearly we have different interpretations of the intended action. May help that you have textmate and therefore know what its operation is. I can only interpret the words provided by the OP.
On 6 February 2016 at 06:58, Matthew Brush notifications@github.com wrote:
rather than setting the search text any time there is a selection made with the dialog open.
I must be missing something, when was this ever proposed behaviour? Unless I'm completely missing the point of this Issue, the goal is to do exactly what it does when the find dialog is hidden, that is, when you press Ctrl+F, the current word under cursor/selection gets filled in the search field. The only difference is that it would do it every time you press Ctrl+F, not just if the search dialog is hidden.
— Reply to this email directly or view it on GitHub https://github.com/geany/geany/issues/758#issuecomment-180552110.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/758#issuecomment-180597794
@codebrainz you have the same understanding of the OP request as me, but as @elextr pointed out, if you change the behaviour to always update the Find box on Ctrl-F, even when it's visible, when you are switching back and forth from editor to Find dialogue while searching for the _same_ text, you would have to check the Find box text each time as it would get updated for every Ctrl-F. However, if you change the behaviour only to update the Find box on Ctrl-F when something is selected (as currently happens when "Use the current word under the cursor for Find dialogues" is unchecked), but allow this to happen when the Find dialogue is visible, that fits the OP request and covers the case of looking for the same text when switching from editor to Find dialogue. Of course, if the user checks the "Use the current word under the cursor for Find dialogues" option, the Find box would possibly update even when nothing was selected, but you have the option to disable that.
The OP mentioned TextPad, a commercial editor which I have also used a lot. It's Find dialogue works like the change I proposed, but AFAIK you have to select something for it to populate the Find box, so Geany (if it were modified) would be a better solution still because it has that option "Use the current word under the cursor for Find dialogues" for those that want that.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/758#issuecomment-180819989
Hi Guys
This issue is affecting me too. consider the steps (from an earlier comment): 1. find something 2. do some editing, which may involve selecting
Now at this point it's equally likely the user wants 3a. find again, still having the original find text available. or 3b. find the new thing just highlighted.
I and from the list of other tools given above I suspect most people want to do: Click "find" for 3a Ctrl-F for 3b
The case is strong enough for it to be an option in settings. Shall I prepare a diff?
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/758#issuecomment-224030797
@jgraley a well written pull request would be fine, so long as it has an option to continue the current behaviour there shouldn't be any problems. Don't forget to document it in the manual (unsubtle hint).
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/758#issuecomment-224117855
Hi everyone, I'm also affected by this issue. Is anyone working on it ? @jgraley Do you have a status ? Thanks
Was anything ever implemented on this? I am still screaming every time that the open Find dialog does not update to the highlighted text when I click Find or Ctrl-F. Please someone call me a dumb-head for not finding the already implemented option.
@kenshail no, nobody contributed anything.
I have changed this on a local copy of 1.34 and it works fine - just one function, search_show_find_dialog had to be changed in Search.c You can leave the search widget open and highlight the next text to find. It transfers to the widget when you click find again without having to close the widget. Modified file attached if anyone wants it. I only implemented it in the basic find, not in find-replace nor find-in-files although it looks like the changes would transcribe quite easily.
Compiling for Linux was straightforward and I did manage to make a windows installer using the help on https://wiki.geany.org/howtos/win32/msys2 That was not so straighforward ! Has anyone made the "Automated build via MAKEPKG file" yet ?
The only problem that I have with only the windows build is that it crashes on help-about. Everything else looks fine. Does anyone have an idea why ? Does windows require something extra for that?
K
----- Original Message ----- From: elextr To: geany/geany Cc: kenshail ; Mention Sent: Wednesday, March 28, 2018 10:22 PM Subject: Re: [geany/geany] Find popup does not update with new highlighted text without closing and reopening it. (#758)
@kenshail no, nobody contributed anything.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
@kenshail I would really like to have this ctrl-f update function :-). Can you help me to get it working on Linux? In short, how (and where) do I change Search.c and compile it?
Cheers, René
@kenshail about the crash on `help-> about` it should be fixed in git
@kenshail I have downloaded and installed version 1.34 (from your comment: "I have changed this on a local copy of 1.34 and it works fine") but the search item in the "Find" field is still not updated accordingly to the highlighted text. Do I have the right version or am I doing the wrong thing?
Did you recompile the modified source? The change saves you having to close and re open the find dialog for a new find. You highlight the required text then click the search tab without closing the dialog. The required text will then appear in the dialog.This procedure is similar to some other editors like Text pad.
Sent from my Samsung device
-------- Original message -------- From: Haburaku notifications@github.com Date: 25/01/2019 19:51 (GMT+07:00) To: geany/geany geany@noreply.github.com Cc: kenshail ken@shail.co.uk, Mention mention@noreply.github.com Subject: Re: [geany/geany] Find popup does not update with new highlighted text without closing and reopening it. (#758)
@kenshail
I have downloaded and installed version 1.34 (from your comment: "I have changed this on a local copy of 1.34 and it works fine") but the search item in the "Find" field is still not updated accordingly to the highlighted text. Do I have the right version or am I doing the wrong thing?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread. {"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png%22,%22... in GitHub","url":"https://github.com/geany/geany%22%7D%7D,%22updates%22:%7B%22snippets%22:%5B%... in #758: @kenshail \r\nI have downloaded and installed version 1.34 (from your comment: "I have changed this on a local copy of 1.34 and it works fine") but the search item in the "Find" field is still not updated accordingly to the highlighted text. Do I have the right version or am I doing the wrong thing?"}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/758#issuecomment-457563486%22%7D%7D%7D [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/geany/geany/issues/758#issuecomment-457563486", "url": "https://github.com/geany/geany/issues/758#issuecomment-457563486", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]
@Haburaku to be clear, AFAIK nobody has made a pull request to add the functionality to Geany, so it will not be in Geany git.
@kenshail modified his own copy, not Geanys.
I simply submitted it as a suggested patch because the discussion at that time seemed to suggest that some may not want search to work that way.
On 2019-01-26 06:46, elextr wrote:
@Haburaku [1] to be clear, AFAIK nobody has made a pull request to add the functionality to Geany, so it will not be in Geany git.
@kenshail [2] modified his own copy, not Geanys.
-- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub [3], or mute the thread [4].
Links: ------ [1] https://github.com/Haburaku [2] https://github.com/kenshail [3] https://github.com/geany/geany/issues/758#issuecomment-457807838 [4] https://github.com/notifications/unsubscribe-auth/AFjqT_royl9Bqj6mwrssPnnhJn...
@kenshail I definitely was not criticising you or implying that you should have done anything different, sorry if it sounded that way.
Just intended to clarify for @Haburaku that the change has to be made locally, its not part of Geany.
Ok, thanks for the clarification. I still think it is a usefull feature. Can the souce code be shared or pushed to git (or a branch if it can't be included in master).
@Haburaku as I said above, nobody has made a pull request with the code and the documentation of the modified behaviour.
No offence taken whatsover. I has assumed that he was using the patched function that I had posted here.
Sent from my Samsung device
-------- Original message -------- From: elextr notifications@github.com Date: 26/01/2019 14:09 (GMT+07:00) To: geany/geany geany@noreply.github.com Cc: kenshail ken@shail.co.uk, Mention mention@noreply.github.com Subject: Re: [geany/geany] Find popup does not update with new highlighted text without closing and reopening it. (#758)
@kenshail I definitely was not criticising you or implying that you should have done anything different, sorry if it sounded that way. Just intended to clarify for @Haburaku that the change has to be made locally, its not part of Geany.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread. {"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png%22,%22... in GitHub","url":"https://github.com/geany/geany%22%7D%7D,%22updates%22:%7B%22snippets%22:%5B%... in #758: @kenshail I definitely was not criticising you or implying that you should have done anything different, sorry if it sounded that way. \r\n\r\nJust intended to clarify for @Haburaku that the change has to be made locally, its not part of Geany."}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/758#issuecomment-457808933%22%7D%7D%7D [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/geany/geany/issues/758#issuecomment-457808933", "url": "https://github.com/geany/geany/issues/758#issuecomment-457808933", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]
Using the fix from kenshail I got it working on my local copy as well, thanks! Reading through PR #588 (in which the update function of the search box is already mentioned) I decided not to go through the steps of making a new PR.
ridiculous! uninstalled
Closed #758.
This was finally fixed in master by 9f5b430458192388a7bf611943fc61b2a8b44246.
github-comments@lists.geany.org