diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-10-11 16:26:24 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-10-11 16:26:24 +0000 |
| commit | 0d8344d3b904c3ae4c18f6bffb9ef7b05c8361e2 (patch) | |
| tree | 279c46ade5c221a938fa77b5da4b49d192f38784 /selection.c | |
| parent | selection: cancel: call selection_stop_scroll_timer() (diff) | |
selection: auto-scroll: call cmd_scrollback_{up,down}() with number of rows
No need to loop and call cmd_scrollback_{up,down}() with ‘1’ each loop
iteration; just call it with the total number of lines to scroll.
Diffstat (limited to 'selection.c')
| -rw-r--r-- | selection.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/selection.c b/selection.c index 54a50ff4..2d40b38b 100644 --- a/selection.c +++ b/selection.c @@ -818,14 +818,12 @@ fdm_scroll_timer(struct fdm *fdm, int fd, int events, void *data) return true; case SELECTION_SCROLL_UP: - for (uint64_t i = 0; i < expiration_count; i++) - cmd_scrollback_up(term, 1); + cmd_scrollback_up(term, expiration_count); selection_update(term, term->selection.auto_scroll.col, 0); break; case SELECTION_SCROLL_DOWN: - for (uint64_t i = 0; i < expiration_count; i++) - cmd_scrollback_down(term, 1); + cmd_scrollback_down(term, expiration_count); selection_update(term, term->selection.auto_scroll.col, term->rows - 1); break; } |
