On 21 September 2010 15:27, Vineet Jain <[email protected]> wrote:
>> highlight f3 Ctrl-V Ctrl-G Ctrl-V Ctrl-G Ctrl-V etc
>
> Find selected and find next can not be bound to the same key.
> Unfortunately, I really miss this functionality. It might seem small,
> but is a huge usability thing. when you start with one keybinding (in
> my case f3) and then have to switch to another key binding to do find
> next.
>
> IMHO, find and replace is such a core component of a text editor, it
> has to be done right. Both find selected and find next should be the
> same key. If something is selected then pressing the find key should
> search for it. If nothing is selected, it should search for the word
> that was last time time highlighted and searched for.
>
> I'm so used to the following key strokes
>
> find -> highlight word -> f3, f3, f3 (do some stuff) f3....
>
> Replace -> highlight word -> f3 -> ctrl v -> f3 -> ctrl v -> f3
>
> With geany:
>
> find -> highlight word -> f3 -> ctrl g -> ctrl g (do some stuff) ->
> ctrl g (I don't understand what changing the key stroke buys you)
>
> replace -> highlight word -> f3 -> ctrl v -> ctrl g -> ctrl v -> ctrl g
Hear is a quick and dirty patch.
Someone might consider if making find_again in callbacks.c global is
the right way to go or if it should be in a utils_... file instead.
Cheers
Lex
> _______________________________________________
> Geany mailing list
> [email protected]
> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
>
Index: search.c
===================================================================
--- search.c (revision 5225)
+++ search.c (working copy)
@@ -340,6 +340,10 @@
editor_display_current_line(doc->editor, 0.3F);
g_free(s);
}
+ else
+ {
+ find_again(FALSE);
+ }
}
Index: callbacks.c
===================================================================
--- callbacks.c (revision 5225)
+++ callbacks.c (working copy)
@@ -1117,7 +1117,7 @@
}
-static void find_again(gboolean change_direction)
+void find_again(gboolean change_direction)
{
GeanyDocument *doc = document_get_current();
_______________________________________________
Geany mailing list
[email protected]
http://lists.uvena.de/cgi-bin/mailman/listinfo/geany