mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-02 07:15:31 -04: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;
|
return true;
|
||||||
|
|
||||||
case SELECTION_SCROLL_UP:
|
case SELECTION_SCROLL_UP:
|
||||||
for (uint64_t i = 0; i < expiration_count; i++)
|
cmd_scrollback_up(term, expiration_count);
|
||||||
cmd_scrollback_up(term, 1);
|
|
||||||
selection_update(term, term->selection.auto_scroll.col, 0);
|
selection_update(term, term->selection.auto_scroll.col, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SELECTION_SCROLL_DOWN:
|
case SELECTION_SCROLL_DOWN:
|
||||||
for (uint64_t i = 0; i < expiration_count; i++)
|
cmd_scrollback_down(term, expiration_count);
|
||||||
cmd_scrollback_down(term, 1);
|
|
||||||
selection_update(term, term->selection.auto_scroll.col, term->rows - 1);
|
selection_update(term, term->selection.auto_scroll.col, term->rows - 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue