From 4c4a64bff49df487d9de0b50300fff2f32bcf3a7 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Mon, 23 Mar 2026 02:59:56 +0100 Subject: Move pages by visible lines --- NEWS | 3 ++- sdn.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index e61ad02..a27d9e2 100644 --- a/NEWS +++ b/NEWS @@ -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. diff --git a/sdn.cpp b/sdn.cpp index 9e9a5ab..7d06725 100644 --- a/sdn.cpp +++ b/sdn.cpp @@ -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++; -- cgit v1.2.3-70-g09d2