about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-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))) {