aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2025-02-17 18:36:55 -0800
committerKaz Kylheku <kaz@kylheku.com>2025-02-17 18:36:55 -0800
commite2152c591b0b8b3f5d8571cb04ea6576ea62ba43 (patch)
treea21deae4f401bb684725b19f50d35e16de248ccc
parentf50af18b765944f8d56dbd13997ea65debf05d29 (diff)
downloadbasta-e2152c591b0b8b3f5d8571cb04ea6576ea62ba43.tar.gz
basta-e2152c591b0b8b3f5d8571cb04ea6576ea62ba43.tar.bz2
basta-e2152c591b0b8b3f5d8571cb04ea6576ea62ba43.zip
bug: unnecessarily deep refresh.
* basta.sh (basta,update_status): Fix another bogus use of || and && into if statement. We only want deep=y to be evaluated whenever the test fails; i.e. to do the deep repaint in the same case when we called basta.prepare_term.
-rw-r--r--basta.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/basta.sh b/basta.sh
index 7dd109b..af96e02 100644
--- a/basta.sh
+++ b/basta.sh
@@ -105,11 +105,15 @@ basta.update_status()
basta.query_termios_lines_cols tio_lines tio_cols
- [ "$1" != WINCH -a \
- $LINES -eq $basta_old_lines -a \
- $COLUMNS -eq $basta_old_cols -a \
- $LINES -eq $tio_lines -a \
- $COLUMNS -eq $tio_cols ] || basta.prepare_term && deep=y
+ if ! [ "$1" != WINCH -a \
+ $LINES -eq $basta_old_lines -a \
+ $COLUMNS -eq $basta_old_cols -a \
+ $LINES -eq $tio_lines -a \
+ $COLUMNS -eq $tio_cols ]
+ then
+ basta.prepare_term
+ deep=y
+ fi
local status_esc=$'\e[7m\e[m'
local status_date=$(date +%m-%d/%H:%M)