about summary refs log tree commit diff stats
path: root/src/ui/core.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-07-18 22:28:49 +0100
committerJames Booth <boothj5@gmail.com>2014-07-18 22:28:49 +0100
commit2a435cd3decc9493c8f54596b4251e6af94a42be (patch)
treef96999e87a537a53d6573e2d395c9d668daddb15 /src/ui/core.c
parent32527eb766fa7cd760c861904e2664de037226cb (diff)
downloadprofani-tty-2a435cd3decc9493c8f54596b4251e6af94a42be.tar.gz
Removed horizontal paging
Diffstat (limited to 'src/ui/core.c')
-rw-r--r--src/ui/core.c34
1 files changed, 2 insertions, 32 deletions
diff --git a/src/ui/core.c b/src/ui/core.c
index 8b7432fa..fe73a906 100644
--- a/src/ui/core.c
+++ b/src/ui/core.c
@@ -1951,14 +1951,10 @@ _win_handle_page(const wint_t * const ch)
 {
     ProfWin *current = wins_get_current();
     int rows = getmaxy(stdscr);
-    int cols = getmaxx(stdscr);
-    int x = getmaxx(current->win);
     int y = getcury(current->win);
 
     int page_space = rows - 4;
-    int horiz_page_space = cols;
     int *page_start = &(current->y_pos);
-    int *horiz_page_start = &(current->x_pos);
 
     if (prefs_get_boolean(PREF_MOUSE)) {
         MEVENT mouse_event;
@@ -1997,34 +1993,8 @@ _win_handle_page(const wint_t * const ch)
         }
     }
 
-    // ctrl+P
-    if (*ch == 16) {
-        *horiz_page_start -= horiz_page_space;
-
-        // went past beginning, show first page
-        if (*horiz_page_start < 0)
-            *horiz_page_start = 0;
-
-        current->paged = 1;
-        win_update_virtual(current);
-
-    // ctrl+N
-    } else if (*ch == 14) {
-        *horiz_page_start += horiz_page_space;
-
-        // only got half a screen, show full screen
-        if ((x - (*horiz_page_start)) < horiz_page_space)
-            *horiz_page_start = x - horiz_page_space;
-
-        // went past end, show full screen
-        else if (*horiz_page_start >= x)
-          *horiz_page_start = x - horiz_page_space;
-
-        current->paged = 1;
-        win_update_virtual(current);
-
     // page up
-    } else if (*ch == KEY_PPAGE) {
+    if (*ch == KEY_PPAGE) {
         *page_start -= page_space;
 
         // went past beginning, show first page
@@ -2051,7 +2021,7 @@ _win_handle_page(const wint_t * const ch)
     }
 
     // switch off page if last line visible
-    if ((y-1) - *page_start == page_space && *horiz_page_start == 0) {
+    if ((y-1) - *page_start == page_space) {
         current->paged = 0;
     }
 }