Browse Source

degesch: bind F5/F6 to previous/next buffer

tags/v0.9
Přemysl Janouch 4 years ago
parent
commit
30c58eede9
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      degesch.c

+ 10
- 0
degesch.c View File

@@ -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);


Loading…
Cancel
Save