aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--sdn.cpp4
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++;