zygo

ncurses gopher client
Log | Files | Refs

commit 732faabdf1c1779a284311c1976026902f501ce0
parent 43bca3f393f6280a1dae0570b96331d604d2bcb4
Author: hhvn <dev@hhvn.uk>
Date:   Sat,  5 Feb 2022 13:03:14 +0000

zygo.c: fix pagescroll

Diffstat:
Mzygo.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/zygo.c b/zygo.c @@ -898,12 +898,12 @@ yank(Elem *e) { void pagescroll(int lines) { - if (lines > 0) { + if (lines > 0 && list_len(&page) > LINES - 1) { ui.scroll += lines; if (ui.scroll > list_len(&page) - LINES) ui.scroll = list_len(&page) - LINES + 1; } else if (lines < 0) { - ui.scroll -= lines; + ui.scroll += lines; if (ui.scroll < 0) ui.scroll = 0; } /* else intentionally left blank */