mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
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.
This commit is contained in:
parent
0cff7c7c4f
commit
0d8344d3b9
1 changed files with 2 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue