From 0880b217cbfa55d5fc4ef7decac37696e8d674f1 Mon Sep 17 00:00:00 2001 From: James Booth Date: Tue, 16 Dec 2014 21:08:48 +0000 Subject: Tidied subwin paging --- src/ui/core.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src') 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))) { -- cgit 1.4.1-2-gfad0