key-binding: deprecate scrollback-up/down, add scrollback-up/down-line

This deprecates/renames scrollback-up/down to scrollback-up/down-page.

It also renames scrollback-up/down-half to
scrollback-up/down-half-page, and adds the new bindings
scrollback-up/down-line.
This commit is contained in:
Daniel Eklöf 2020-09-10 18:17:47 +02:00
parent 2e3bd5e23c
commit 4d13429235
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
6 changed files with 99 additions and 24 deletions

14
input.c
View file

@ -88,21 +88,31 @@ execute_binding(struct seat *seat, struct terminal *term,
return true;
case BIND_ACTION_SCROLLBACK_UP:
case BIND_ACTION_SCROLLBACK_UP_PAGE:
cmd_scrollback_up(term, term->rows);
return true;
case BIND_ACTION_SCROLLBACK_UP_HALF:
case BIND_ACTION_SCROLLBACK_UP_HALF_PAGE:
cmd_scrollback_up(term, max(term->rows / 2, 1));
return true;
case BIND_ACTION_SCROLLBACK_UP_LINE:
cmd_scrollback_up(term, 1);
return true;
case BIND_ACTION_SCROLLBACK_DOWN:
case BIND_ACTION_SCROLLBACK_DOWN_PAGE:
cmd_scrollback_down(term, term->rows);
return true;
case BIND_ACTION_SCROLLBACK_DOWN_HALF:
case BIND_ACTION_SCROLLBACK_DOWN_HALF_PAGE:
cmd_scrollback_down(term, max(term->rows / 2, 1));
return true;
case BIND_ACTION_SCROLLBACK_DOWN_LINE:
cmd_scrollback_down(term, 1);
return true;
case BIND_ACTION_CLIPBOARD_COPY:
selection_to_clipboard(seat, term, serial);
return true;