diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2015-05-07 19:48:10 +0200 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2015-05-07 19:48:10 +0200 |
commit | 30c58eede9e27c7c8d8a48818fa3335e41434705 (patch) | |
tree | e71f3fdc7a2aaed05a16ba4756edf20ebcebe729 | |
parent | 2c95c406f41c10e7e2f40095f3524c3f36a99da1 (diff) | |
download | xK-30c58eede9e27c7c8d8a48818fa3335e41434705.tar.gz xK-30c58eede9e27c7c8d8a48818fa3335e41434705.tar.xz xK-30c58eede9e27c7c8d8a48818fa3335e41434705.zip |
degesch: bind F5/F6 to previous/next buffer
-rw-r--r-- | degesch.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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); |