make search part of selection mode

This commit is contained in:
Daniel Micay 2012-07-11 03:35:38 -04:00
parent 950d7c2eb7
commit 87da2c8359
2 changed files with 26 additions and 26 deletions

View File

@ -16,12 +16,6 @@ KEYBINDINGS
* ``ctrl-shift-c``: copy to CLIPBOARD * ``ctrl-shift-c``: copy to CLIPBOARD
* ``ctrl-shift-v``: paste from CLIPBOARD * ``ctrl-shift-v``: paste from CLIPBOARD
* ``ctrl-shift-u``: unicode input (standard GTK binding) * ``ctrl-shift-u``: unicode input (standard GTK binding)
* ``ctrl-shift-f``: start forward search
* ``ctrl-shift-b``: start reverse search
* ``ctrl-shift-j``: start forward url search
* ``ctrl-shift-k``: start reverse url search
* ``ctrl-shift-n``: jump to next search match
* ``ctrl-shift-p``: jump to previous search match
* ``ctrl-tab``: start scrollback completion * ``ctrl-tab``: start scrollback completion
* ``ctrl-shift-space``: start selection mode * ``ctrl-shift-space``: start selection mode
@ -44,6 +38,12 @@ TEXT SELECTION MODE
* ``g``: jump to start of first row * ``g``: jump to start of first row
* ``G``: jump to start of last row * ``G``: jump to start of last row
* ``y``: copy to CLIPBOARD * ``y``: copy to CLIPBOARD
* ``/``: forward search
* ``?``: reverse search
* ``u``: forward url search
* ``U``: reverse url search
* ``n``: next search match
* ``N``: previous search match
TODO TODO
==== ====

View File

@ -242,6 +242,26 @@ gboolean key_press_cb(VteTerminal *vte, GdkEventKey *event, search_panel_info *i
case GDK_KEY_y: case GDK_KEY_y:
vte_terminal_copy_clipboard(vte); vte_terminal_copy_clipboard(vte);
break; break;
case GDK_KEY_slash:
overlay_show(info, OVERLAY_SEARCH, true);
break;
case GDK_KEY_question:
overlay_show(info, OVERLAY_RSEARCH, true);
break;
case GDK_KEY_n:
vte_terminal_search_find_next(vte);
vte_terminal_copy_primary(vte);
break;
case GDK_KEY_N:
vte_terminal_search_find_previous(vte);
vte_terminal_copy_primary(vte);
break;
case GDK_KEY_u:
search(vte, url_regex, false);
break;
case GDK_KEY_U:
search(vte, url_regex, true);
break;
} }
return TRUE; return TRUE;
} }
@ -256,26 +276,6 @@ gboolean key_press_cb(VteTerminal *vte, GdkEventKey *event, search_panel_info *i
case GDK_KEY_v: case GDK_KEY_v:
vte_terminal_paste_clipboard(vte); vte_terminal_paste_clipboard(vte);
return TRUE; return TRUE;
case GDK_KEY_p:
vte_terminal_search_find_previous(vte);
vte_terminal_copy_primary(vte);
return TRUE;
case GDK_KEY_n:
vte_terminal_search_find_next(vte);
vte_terminal_copy_primary(vte);
return TRUE;
case GDK_KEY_f:
overlay_show(info, OVERLAY_SEARCH, true);
return TRUE;
case GDK_KEY_r:
overlay_show(info, OVERLAY_RSEARCH, true);
return TRUE;
case GDK_KEY_j:
search(vte, url_regex, false);
return TRUE;
case GDK_KEY_k:
search(vte, url_regex, true);
return TRUE;
case GDK_KEY_Escape: case GDK_KEY_Escape:
load_config(GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(vte))), load_config(GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(vte))),
vte, &dynamic_title, &urgent_on_bell, vte, &dynamic_title, &urgent_on_bell,