I'm a keyboard user with carpal tunnel. When I search for a string, half the time it's going to be above the cursor in the file. Unfortunately, the default option in the Question dialog is "Cancel":
![image](https://cloud.githubusercontent.com/assets/33569/17943220/5321d8d0-69ef-11e6...)
I think a more useful default would be to Find again. If I want to Cancel, I'll press Esc. If I want to find again, I have to press two keystrokes (Alt+F, or Right Arrow then Enter). I know one extra keystroke is not much, but they add up.
Any thoughts on making `Find` the default?
Any thoughts on making Find the default?
Or even better, just wrap around the search without asking. All it needs is some visual indication that it happened. I've seen some IDE (QtCreator maybe?) fade in/out a "refresh" kind of image over the editor quickly on wrap-around to let you know what happened.
Yeah, if search stops where it started, then automatic wrap is fine.
Pull Requests are welcome :)
It would indeed make more sense to stop and nag where it started than at the end of the file.
Note from #1660:
Do you mean something like "Always wrap search" (see https://geany.org/manual/#search)? It's in the main preferences dialog in the General tab.
This could also help: #2159.
@vstepaniuk if you select the option Geany wraps and shows a count as noted in #2159
@elextr No, in 1.32 it doesn't. Can you make a screenshot?
It does [here](https://github.com/geany/geany/blob/868da11715ed86d08c1c2c4deaf1b2aa6c209df4...) and AFAICT that was part of 1.32. Please provide steps to reproduce
We shouldn't hijack this issue, it's literally just to change the default button on the wrap search dialog which would most likely be an acceptable change if someone does it.
Probably the approach would be to add another argument to [`dialogs.c::show_prompt()`](https://github.com/geany/geany/blob/868da11715ed86d08c1c2c4deaf1b2aa6c209df4...) and friends which tells the default button, so it can be passed via wrapper functions in [`document.c::document_find_text()`](https://github.com/geany/geany/blob/868da11715ed86d08c1c2c4deaf1b2aa6c209df4...).
Alternatively it might be easier to just create an ad hoc dialog normally at the call site and set it up as needed, to avoid affecting all the callers of `dialogs_show_question_full()` and friends.
It does here and AFAICT that was part of 1.32
That's "Find Usages", not the regular find/search.
It does here and AFAICT that was part of 1.32
That's "Find Usages", not the regular find/search.
RTFC, thats whats called for find all in session and document.
RTFC, thats whats called for find all in session and document.
The function is called `search_find_usage` so I assumed it was used for "Find usages" feature.
Anyway, I do not believe this or #2195 are referring to "find all", but rather incremental search, which doesn't print anything for me either (1.34) whether the wrap-search option is enabled or not.
The function is called search_find_usage so I assumed it was used for "Find usages" feature.
I know, not my name, thats why I said you have to RTFC :)
but rather incremental search, which doesn't print anything for me either (1.34) whether the wrap-search option is enabled or not.
Correct, but as I said above, its only ever going to say `Found 1 match to "foo"` whilst its incremental, changing search totally is addressed in #2159, lets keep it there or a separate issue properly titled.
if you select the option Geany wraps and shows a count as noted in #2159
There is no answer better than this
Anyway, I do not believe this or #2159 are referring to "find all", but rather incremental search, which doesn't print anything for me either (1.34) whether the wrap-search option is enabled or not.
It does here and AFAICT that was part of 1.32. Please provide steps to reproduce
1. "Find all" (the piece of code you referred to) doesn't anyhow depend on the "Always wrap search" option. 2. If you want to confirm your words and to show some run-time effect in a compiled program, it's better to just make a screenshot, than to refer to an unrelated piece of code.
RTFC (C for comment..)
@elextr No, in 1.32 it doesn't.
Can you make a screenshot?
Your comment was about #2159 and my comment was replying, referring to "Find All" as mentioned in #2159. As discussed there, find all gives a message with the count of the number found, and to the best of my git searching it did in 1.32, single find finds only one item, so it would only ever have a "count" of one to show in a message and it cannot give a total, so there is no point in single find giving a message and it does not. And as noted in #2159 it would be a redesign of the search facilities for it to give a total.
As noted above please keep that discussion on that issue not spread across several, thats what leads to this sort of confusion when referring between issues.
Just a nudge that I've installed Geany 1.36 on a new machine ~3 years later, and ran again into this usability issue. Thanks in advance to the kind soul(s) who can provide a PR.
@dandv what exactly is "this"?
If you mean the original post, for several versions now Geany has wrapped search automatically if its selected in the preferences `Menu->Edit->Preferences->General->Miscellaneous->Always wrap search".
@elextr: should the default be to always wrap search?
@dandv If somebody makes a PR possibly.
Closed #1192 as completed via #4042.
Closed #1192 as completed via 87cdc362bfe480f830c97ac009d328978156c887.
github-comments@lists.geany.org