mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
Drop special handling of ctrl-l
Drop special handling of ctrl-l in handle_interlink_event. To make sure that the 'redraw' action works everywhere, first modify menu_kbd_handler and mainmenu_kbd_handler to handle ACT_MENU_REDRAW; and second, drop the ACTION_REQUIRE_VIEW_STATE flag from the 'redraw' action in the 'main' keymap so that it works even if there is no document loaded. Ctrl-l is already bound to 'redraw' in all keymaps by default, so the current default behaviour is preserved.
This commit is contained in:
parent
3334efb32c
commit
f1dee0d04f
src
@ -937,6 +937,11 @@ menu_kbd_handler(struct menu *menu, struct term_event *ev)
|
||||
search_menu(menu);
|
||||
break;
|
||||
|
||||
case ACT_MENU_REDRAW:
|
||||
display_menu(win->term, menu);
|
||||
redraw_terminal_cls(win->term);
|
||||
break;
|
||||
|
||||
case ACT_MENU_CANCEL:
|
||||
if (list_has_next(win->term->windows, win)
|
||||
&& win->next->handler == mainmenu_handler)
|
||||
@ -1296,7 +1301,8 @@ mainmenu_kbd_handler(struct menu *menu, struct term_event *ev)
|
||||
break;
|
||||
|
||||
case ACT_MENU_REDRAW:
|
||||
/* Just call display_mainmenu() */
|
||||
display_mainmenu(win->term, menu);
|
||||
redraw_terminal_cls(win->term);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -82,7 +82,7 @@ ACTION_(MAIN, "open-os-shell", OPEN_OS_SHELL, N__("Open an OS shell"), ACTION_RE
|
||||
ACTION_(MAIN, "options-manager", OPTIONS_MANAGER, N__("Open options manager"), ACTION_RESTRICT_ANONYMOUS),
|
||||
ACTION_(MAIN, "quit", QUIT, N__("Open a quit confirmation dialog box"), 0),
|
||||
ACTION_(MAIN, "really-quit", REALLY_QUIT, N__("Quit without confirmation"), 0),
|
||||
ACTION_(MAIN, "redraw", REDRAW, N__("Redraw the terminal"), ACTION_REQUIRE_VIEW_STATE),
|
||||
ACTION_(MAIN, "redraw", REDRAW, N__("Redraw the terminal"), 0),
|
||||
ACTION_(MAIN, "reload", RELOAD, N__("Reload the current page"), 0),
|
||||
ACTION_(MAIN, "rerender", RERENDER, N__("Re-render the current page"), 0),
|
||||
ACTION_(MAIN, "reset-form", RESET_FORM, N__("Reset form items to their initial values"), ACTION_REQUIRE_VIEW_STATE | ACTION_REQUIRE_LOCATION),
|
||||
|
@ -300,11 +300,7 @@ handle_interlink_event(struct terminal *term, struct interlink_event *ilev)
|
||||
|
||||
reset_timer();
|
||||
|
||||
if (modifier == KBD_MOD_CTRL && (key == 'l' || key == 'L')) {
|
||||
redraw_terminal_cls(term);
|
||||
break;
|
||||
|
||||
} else if (key == KBD_CTRL_C) {
|
||||
if (key == KBD_CTRL_C) {
|
||||
destroy_terminal(term);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user