From baf2a43da2d1bde46f0b34867e2b129a91d32567 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Mon, 31 Jan 2022 10:47:31 +0100 Subject: [PATCH] Merge pull request #57 from ailin-nemui/lr-skip-visible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make window left/right skip windows that are already visible in other… (cherry picked from commit 53187de6a20f772c81cfe568c6696043405a3fd0) --- src/fe-text/mainwindows.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/fe-text/mainwindows.c b/src/fe-text/mainwindows.c index 711daf0a..fae7ced8 100644 --- a/src/fe-text/mainwindows.c +++ b/src/fe-text/mainwindows.c @@ -1642,9 +1642,9 @@ 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; + return refnum; } static int window_refnum_right(int refnum, int wrap) @@ -1664,9 +1664,9 @@ 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; + return refnum; } /* SYNTAX: WINDOW LEFT [-directional] */