2019-09-16 13:31:58 +00:00
|
|
|
void
|
|
|
|
kscrolldown(const Arg* a)
|
|
|
|
{
|
|
|
|
int n = a->i;
|
|
|
|
|
|
|
|
if (n < 0)
|
|
|
|
n = term.row + n;
|
|
|
|
|
|
|
|
if (n > term.scr)
|
|
|
|
n = term.scr;
|
|
|
|
|
|
|
|
if (term.scr > 0) {
|
|
|
|
term.scr -= n;
|
|
|
|
selscroll(0, -n);
|
|
|
|
tfulldirt();
|
|
|
|
}
|
2021-07-07 07:43:43 +00:00
|
|
|
|
|
|
|
#if SIXEL_PATCH
|
|
|
|
scroll_images(-1*n);
|
|
|
|
#endif // SIXEL_PATCH
|
2019-09-16 13:31:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
kscrollup(const Arg* a)
|
|
|
|
{
|
|
|
|
int n = a->i;
|
|
|
|
if (n < 0)
|
|
|
|
n = term.row + n;
|
|
|
|
|
|
|
|
if (term.scr <= HISTSIZE-n) {
|
|
|
|
term.scr += n;
|
|
|
|
selscroll(0, n);
|
|
|
|
tfulldirt();
|
|
|
|
}
|
2021-07-07 07:43:43 +00:00
|
|
|
|
|
|
|
#if SIXEL_PATCH
|
|
|
|
scroll_images(n);
|
|
|
|
#endif // SIXEL_PATCH
|
2019-09-16 13:31:58 +00:00
|
|
|
}
|