Move pages by visible lines
All checks were successful
Alpine 3.23 Success
Alpine 3.23 aarch64 Success
Arch Linux AUR Success
OpenBSD 7.8 Success

This commit is contained in:
2026-03-23 02:59:56 +01:00
parent d1e54fee0d
commit 4c4a64bff4
2 changed files with 4 additions and 3 deletions

3
NEWS
View File

@@ -1,7 +1,8 @@
Unreleased
* Added C-b and C-f bindings for page up and page down navigation
in normal mode.
in normal mode. The respective actions now move by visible lines
rather than by the full height of the terminal.
* Added an sdn-edit script analogous to sdn-view, bound it to F4,
and moved the original key binding to F14.

View File

@@ -1636,10 +1636,10 @@ fun handle (Key k) -> bool {
break;
case ACTION_PAGE_PREVIOUS:
g.cursor -= LINES;
g.cursor -= visible_lines ();
break;
case ACTION_PAGE_NEXT:
g.cursor += LINES;
g.cursor += visible_lines ();
break;
case ACTION_SCROLL_DOWN:
g.offset++;