From 23fe491e84db152ff595b5411b97f5208e08926c Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 15 Nov 2001 20:49:12 +0000 Subject: [PATCH] /WINDOW DOWN and /WINDOW UP now cycle to highest/lowest window. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2024 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-text/mainwindows.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/fe-text/mainwindows.c b/src/fe-text/mainwindows.c index bb51fe27..13f94e27 100644 --- a/src/fe-text/mainwindows.c +++ b/src/fe-text/mainwindows.c @@ -821,6 +821,8 @@ static void cmd_window_up(void) MAIN_WINDOW_REC *rec; rec = mainwindows_find_upper(active_mainwin->first_line); + if (rec == NULL) + rec = mainwindows_find_upper(term_height); if (rec != NULL) window_set_active(rec->active); } @@ -831,6 +833,8 @@ static void cmd_window_down(void) MAIN_WINDOW_REC *rec; rec = mainwindows_find_lower(active_mainwin->last_line); + if (rec == NULL) + rec = mainwindows_find_lower(-1); if (rec != NULL) window_set_active(rec->active); }