mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
auto-completion reads not only the first character, but also the next ones.
This behaviour is similar to other browsers.
This commit is contained in:
parent
c84dfd7e18
commit
3688bb9c61
@ -80,7 +80,7 @@ do_tab_compl(struct dialog_data *dlg_data,
|
||||
}
|
||||
|
||||
if (n > 1) {
|
||||
do_menu_selected(term, items, dlg_data, n - 1, 0);
|
||||
do_menu_selected(term, items, dlg_data, n - 1, -1);
|
||||
} else {
|
||||
if (n == 1) tab_compl(dlg_data, items->data);
|
||||
mem_free(items);
|
||||
|
@ -964,11 +964,29 @@ menu_kbd_handler(struct menu *menu, struct term_event *ev)
|
||||
if (!check_kbd_label_key(ev))
|
||||
break;
|
||||
|
||||
if (menu->hotkeys != -1) {
|
||||
s = check_hotkeys(menu, key, win->term);
|
||||
|
||||
if (s || check_not_so_hot_keys(menu, key, win->term))
|
||||
if (s || check_not_so_hot_keys(menu, key, win->term)) {
|
||||
scroll_menu(menu, 0, 1);
|
||||
}
|
||||
} else {
|
||||
struct terminal *term = win->term;
|
||||
struct keybinding *auto_complete = kbd_nm_lookup(KEYMAP_EDIT, "auto-complete");
|
||||
|
||||
delete_window_ev(win, NULL);
|
||||
term_send_event(term, ev);
|
||||
|
||||
if (auto_complete) {
|
||||
struct term_event complete;
|
||||
|
||||
complete.ev = EVENT_KBD;
|
||||
complete.info.keyboard = auto_complete->kbd;
|
||||
term_send_event(term, &complete);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
display_menu(win->term, menu);
|
||||
|
Loading…
Reference in New Issue
Block a user