From e2152c591b0b8b3f5d8571cb04ea6576ea62ba43 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 17 Feb 2025 18:36:55 -0800 Subject: 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. --- basta.sh | 14 +++++++++----- 1 file 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) -- cgit v1.2.3