From 15b8dde1a5153669e85eecfa7320cacbe979ad14 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 19 Apr 2024 18:42:33 +0100 Subject: fix & improve comment, check @$old_cols for whether exiting monocle Fixes: ncols=2, $avail_l && $avail_r, close leftmost column. Previously this pulled from the right. Now it pulls from the left. Signed-off-by: Sean Whitton --- bin/papersway | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/papersway b/bin/papersway index 3073361..200ba0b 100755 --- a/bin/papersway +++ b/bin/papersway @@ -481,11 +481,11 @@ sub normalise_ws_cols { } else { # $old_i == $i. if ($old_i == 0) { # We were in the first column. Either we closed the leftmost - # column, or we lost arbitrary columns from the left + # column, or we lost arbitrary columns from the right # (e.g. monocle from the first column). We prefer to pull # from the left in the former case. If we are indeed exiting - # monocle mode, we must pull from the right. - if (@$cols == 1) { + # monocle mode, we must pull more from the right. + if (@$old_cols == 1) { $from_r = min $avail_r, $want; } else { $from_l = !!$avail_l; -- cgit v1.2.3