replace multi_url with a different keybinding

This commit is contained in:
Daniel Micay 2012-08-24 10:27:48 -04:00
parent 388539ae6c
commit 275bed4ea0
3 changed files with 8 additions and 11 deletions

View File

@ -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

View File

@ -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);

View File

@ -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