CTRl-g (search mode): cancel search and clear text entry
This commit is contained in:
parent
b3dbc9ca9a
commit
8e028445ca
|
@ -25,6 +25,7 @@ Features
|
|||
* CTRL-S to search forward through history.
|
||||
* "!" enters a special search mode, matching only the start of strings.
|
||||
-- Esc to cancel search (only once).
|
||||
-- CTRL-G to cancel search and clear the text entry
|
||||
|
||||
* URL handlers allowing you to enter lines like "http://www.google.com"
|
||||
to start your favorite browser on www.google.com.
|
||||
|
|
|
@ -1089,6 +1089,14 @@ on_key_press(GtkCompletionLine *cl, GdkEventKey *event, gpointer data)
|
|||
}
|
||||
return TRUE; /* stop signal emission */
|
||||
|
||||
case GDK_KEY_G:
|
||||
case GDK_KEY_g:
|
||||
if ((event->state & GDK_CONTROL_MASK) && cl->hist_search_mode) {
|
||||
search_off(cl);
|
||||
gtk_entry_set_text (GTK_ENTRY (cl), "");
|
||||
return TRUE; /* stop signal emission */
|
||||
} else goto ordinary;
|
||||
|
||||
ordinary:
|
||||
default:
|
||||
if (cl->win_compl != NULL) {
|
||||
|
|
Loading…
Reference in New Issue