diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2024-04-19 18:42:33 +0100 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2024-04-19 18:42:33 +0100 |
commit | 15b8dde1a5153669e85eecfa7320cacbe979ad14 (patch) | |
tree | 76366ce5b871dcd80453931a8ed7b9a69c135a26 | |
parent | 81fafc411c121534a999fe7efbf5b48c9167f18d (diff) | |
download | papersway-15b8dde1a5153669e85eecfa7320cacbe979ad14.tar.gz |
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 <spwhitton@spwhitton.name>
-rwxr-xr-x | bin/papersway | 6 |
1 files 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; |