exiting command mode should kill the entry

This commit is contained in:
Simon Gomizelj 2012-09-27 11:55:01 -04:00
parent 6e168e25d6
commit 307f2438c1
1 changed files with 4 additions and 3 deletions

View File

@ -436,6 +436,10 @@ gboolean key_press_cb(VteTerminal *vte, GdkEventKey *event, keybind_info *info)
return TRUE; return TRUE;
} }
switch (event->keyval) { switch (event->keyval) {
case GDK_KEY_Escape:
gtk_widget_hide(info->panel.entry);
exit_command_mode(vte, &info->select);
break;
case GDK_KEY_Left: case GDK_KEY_Left:
case GDK_KEY_h: case GDK_KEY_h:
move(vte, &info->select, -1, 0); move(vte, &info->select, -1, 0);
@ -482,9 +486,6 @@ gboolean key_press_cb(VteTerminal *vte, GdkEventKey *event, keybind_info *info)
case GDK_KEY_V: case GDK_KEY_V:
toggle_visual(vte, &info->select, vi_mode::visual_line); toggle_visual(vte, &info->select, vi_mode::visual_line);
break; break;
case GDK_KEY_Escape:
exit_command_mode(vte, &info->select);
break;
case GDK_KEY_y: case GDK_KEY_y:
vte_terminal_copy_clipboard(vte); vte_terminal_copy_clipboard(vte);
break; break;