about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-12-16 21:08:48 +0000
committerJames Booth <boothj5@gmail.com>2014-12-16 21:08:48 +0000
commit0880b217cbfa55d5fc4ef7decac37696e8d674f1 (patch)
tree65477d7aa5474469a0743275a59be914dea63c85 /src
parent8f6167b45e3f1376ad46f1d48a28ca67bfdef426 (diff)
downloadprofani-tty-0880b217cbfa55d5fc4ef7decac37696e8d674f1.tar.gz
Tidied subwin paging
Diffstat (limited to 'src')
-rw-r--r--src/ui/core.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/ui/core.c b/src/ui/core.c
index a70e76e9..3295c028 100644
--- a/src/ui/core.c
+++ b/src/ui/core.c
@@ -3339,15 +3339,10 @@ _win_handle_page(const wint_t * const ch, const int result)
         current->layout->paged = 0;
     }
 
-    if ((current->type == WIN_MUC) || (current->type == WIN_CONSOLE)) {
-        int sub_y = 0;
-        int *sub_y_pos = NULL;
-
-        if (current->type == WIN_MUC || current->type == WIN_CONSOLE) {
-            ProfLayoutSplit *split_layout = (ProfLayoutSplit*)current->layout;
-            sub_y = getcury(split_layout->subwin);
-            sub_y_pos = &(split_layout->sub_y_pos);
-        }
+    if (current->layout->type == LAYOUT_SPLIT) {
+        ProfLayoutSplit *split_layout = (ProfLayoutSplit*)current->layout;
+        int sub_y = getcury(split_layout->subwin);
+        int *sub_y_pos = &(split_layout->sub_y_pos);
 
         // alt up arrow
         if ((result == KEY_CODE_YES) && ((*ch == 565) || (*ch == 337))) {