degesch: bind F5/F6 to previous/next buffer

This commit is contained in:
Přemysl Eric Janouch 2015-05-07 19:48:10 +02:00
parent 2c95c406f4
commit 30c58eede9

View File

@ -5498,6 +5498,11 @@ app_readline_init (void)
app_readline_bind_meta ('p', rl_named_function ("previous-history")); app_readline_bind_meta ('p', rl_named_function ("previous-history"));
app_readline_bind_meta ('n', rl_named_function ("next-history")); app_readline_bind_meta ('n', rl_named_function ("next-history"));
if (key_f5)
rl_bind_keyseq (key_f5, rl_named_function ("previous-buffer"));
if (key_f6)
rl_bind_keyseq (key_f6, rl_named_function ("next-buffer"));
// We need to hide the prompt first // We need to hide the prompt first
rl_bind_key (RETURN, on_readline_return); rl_bind_key (RETURN, on_readline_return);
@ -5666,6 +5671,11 @@ app_editline_init (struct input *self)
el_set (self->editline, EL_BIND, "^P", "previous-buffer", NULL); el_set (self->editline, EL_BIND, "^P", "previous-buffer", NULL);
el_set (self->editline, EL_BIND, "^N", "next-buffer", NULL); el_set (self->editline, EL_BIND, "^N", "next-buffer", NULL);
if (key_f5)
el_set (self->editline, EL_BIND, key_f5, "previous-buffer", NULL);
if (key_f6)
el_set (self->editline, EL_BIND, key_f6, "next-buffer", NULL);
// Source the user's defaults file // Source the user's defaults file
el_source (self->editline, NULL); el_source (self->editline, NULL);