diff --git a/README.rst b/README.rst index 3f21799..ece721c 100644 --- a/README.rst +++ b/README.rst @@ -37,7 +37,8 @@ COMMAND MODE * ``?``: reverse search * ``u``: forward url search * ``U``: reverse url search -* ``Return``: open the current selection as a url +* ``o``: open the current selection as a url +* ``Return``: open the current selection as a url and exit command mode * ``n``: next search match * ``N``: previous search match diff --git a/termite.cc b/termite.cc index 868de73..80a095e 100644 --- a/termite.cc +++ b/termite.cc @@ -45,7 +45,7 @@ struct search_panel_info { }; struct config_info { - gboolean dynamic_title, urgent_on_bell, clickable_url, multi_url; + gboolean dynamic_title, urgent_on_bell, clickable_url; int tag; }; @@ -356,10 +356,12 @@ gboolean key_press_cb(VteTerminal *vte, GdkEventKey *event, keybind_info *info) case GDK_KEY_U: search(vte, url_regex, true); break; + case GDK_KEY_o: + open_selection(vte); + break; case GDK_KEY_Return: open_selection(vte); - if (!info->config.multi_url) - end_selection(vte, &info->select); + end_selection(vte, &info->select); break; } return TRUE; @@ -664,9 +666,6 @@ static void load_config(GtkWindow *window, VteTerminal *vte, config_info *info, if (get_config_boolean(config, "options", "urgent_on_bell", &cfgbool)) { info->urgent_on_bell = cfgbool; } - if (get_config_boolean(config, "options", "multi_url", &cfgbool)) { - info->multi_url = cfgbool; - } if (get_config_boolean(config, "options", "search_wrap", &cfgbool)) { vte_terminal_search_set_wrap_around(vte, cfgbool); } @@ -881,7 +880,7 @@ int main(int argc, char **argv) { search_panel_info panel = {vte, gtk_entry_new(), gtk_alignment_new(0, 0, 1, 1), overlay_mode::hidden}; - keybind_info info = {panel, {vi_mode::insert, 0, 0, 0, 0}, {FALSE, FALSE, FALSE, FALSE, -1}}; + keybind_info info = {panel, {vi_mode::insert, 0, 0, 0, 0}, {FALSE, FALSE, FALSE, -1}}; load_config(GTK_WINDOW(window), vte, &info.config, &term, &geometry); diff --git a/termite.cfg b/termite.cfg index 76cd198..2b94f03 100644 --- a/termite.cfg +++ b/termite.cfg @@ -15,9 +15,6 @@ search_wrap = true #icon_name = terminal #geometry = 640x480 -# stay in command mode after opening a url -multi_url = false - # 0.0: opaque, 1.0: transparent transparency = 0.0