From 29e36a8fb0ff74a666dd49b605a9ae62d869ba41 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Thu, 31 Mar 2011 02:44:33 +0200 Subject: [PATCH] Make window left/right skip windows that are already visible in other mainwins --- src/fe-text/mainwindows.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/fe-text/mainwindows.c b/src/fe-text/mainwindows.c index 711daf0a..be2cb100 100644 --- a/src/fe-text/mainwindows.c +++ b/src/fe-text/mainwindows.c @@ -1642,7 +1642,8 @@ static int window_refnum_left(int refnum, int wrap) break; window = window_find_refnum(refnum); - } while (!WINDOW_STICKY_MATCH(window, find_sticky)); + } while (!WINDOW_STICKY_MATCH(window, find_sticky) || + is_window_visible(window)); return refnum; } @@ -1664,7 +1665,8 @@ static int window_refnum_right(int refnum, int wrap) break; window = window_find_refnum(refnum); - } while (!WINDOW_STICKY_MATCH(window, find_sticky)); + } while (!WINDOW_STICKY_MATCH(window, find_sticky) || + is_window_visible(window)); return refnum; }