properly exit url hint mode on Esc key

This commit is contained in:
Simon Gomizelj 2012-09-27 12:39:03 -04:00
parent 21d15c0cb6
commit a7458fba67
1 changed files with 4 additions and 3 deletions

View File

@ -448,8 +448,9 @@ gboolean key_press_cb(VteTerminal *vte, GdkEventKey *event, keybind_info *info)
}
switch (event->keyval) {
case GDK_KEY_Escape:
gtk_widget_hide(info->panel.entry);
exit_command_mode(vte, &info->select);
exit_command_mode(info->panel.vte, &info->select);
gtk_widget_hide(info->panel.da);
info->panel.url_list.clear();
break;
case GDK_KEY_Left:
case GDK_KEY_h:
@ -595,7 +596,6 @@ gboolean entry_key_press_cb(GtkEntry *entry, GdkEventKey *event, keybind_info *i
break;
case overlay_mode::urlselect:
launch_url(text, &info->panel);
exit_command_mode(info->panel.vte, &info->select);
break;
case overlay_mode::hidden:
break;
@ -616,6 +616,7 @@ gboolean entry_key_press_cb(GtkEntry *entry, GdkEventKey *event, keybind_info *i
if (ret) {
if (info->panel.mode == overlay_mode::urlselect) {
exit_command_mode(info->panel.vte, &info->select);
gtk_widget_hide(info->panel.da);
info->panel.url_list.clear();
}