From 30c58eede9e27c7c8d8a48818fa3335e41434705 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Thu, 7 May 2015 19:48:10 +0200 Subject: degesch: bind F5/F6 to previous/next buffer --- degesch.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/degesch.c b/degesch.c index 4a9a83a..a211c36 100644 --- a/degesch.c +++ b/degesch.c @@ -5498,6 +5498,11 @@ app_readline_init (void) app_readline_bind_meta ('p', rl_named_function ("previous-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 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, "^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 el_source (self->editline, NULL); -- cgit v1.2.3-70-g09d2