about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-08-31 23:46:13 +0100
committerJames Booth <boothj5@gmail.com>2014-08-31 23:46:13 +0100
commit8cf5241d3195568114db5acf08949ad1e49c85ae (patch)
tree0b606b507b42fcff1ee98c401a4e0520194ecec9 /src
parent15fe590eda5e8c85fbe1ebb4cd5b50c434ee5b60 (diff)
downloadprofani-tty-8cf5241d3195568114db5acf08949ad1e49c85ae.tar.gz
Paging fixes
- Include empty line when showing end page
- Switch off paging when last line and empty line visible
Diffstat (limited to 'src')
-rw-r--r--src/ui/core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ui/core.c b/src/ui/core.c
index c338b4e4..6f82d558 100644
--- a/src/ui/core.c
+++ b/src/ui/core.c
@@ -2082,14 +2082,14 @@ _win_handle_page(const wint_t * const ch)
 
         // went past end, show full screen
         else if (*page_start >= y)
-            *page_start = y - page_space;
+            *page_start = y - page_space - 1;
 
         current->paged = 1;
         win_update_virtual(current);
     }
 
-    // switch off page if last line visible
-    if ((y-1) - *page_start == page_space) {
+    // switch off page if last line and space line visible
+    if ((y) - *page_start == page_space) {
         current->paged = 0;
     }
 }