aboutsummaryrefslogtreecommitdiffstats
path: root/basta.sh
diff options
context:
space:
mode:
Diffstat (limited to 'basta.sh')
-rw-r--r--basta.sh31
1 files changed, 12 insertions, 19 deletions
diff --git a/basta.sh b/basta.sh
index af96e02..fdf994e 100644
--- a/basta.sh
+++ b/basta.sh
@@ -101,19 +101,14 @@ basta.update_status()
local tio_lines
local tio_cols
local i j
- local deep=
basta.query_termios_lines_cols tio_lines tio_cols
- 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
+ [ "$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
local status_esc=$'\e[7m\e[m'
local status_date=$(date +%m-%d/%H:%M)
@@ -135,16 +130,14 @@ basta.update_status()
printf $'\e7\e[%s;1H\e[K%s\e[1;%sr' \
$((basta_scroll_lines + 1)) "$status" $basta_scroll_lines
- if [ $deep ] ; then
- printf $'\e[=7l'
- for (( i = $basta_prev_reserved_rows - 1, j = 2; i >= 0; i--, j++ )) ; do
- printf $'\e[%s;1H\e[K%s' \
- $((basta_scroll_lines + j)) "${LC_basta_status[i]}"
- done
- printf $'\e[=7h'
- fi
+ printf $'\e[=7l'
+ for (( i = $basta_prev_reserved_rows - 1, j = 2; i >= 0; i--, j++ )) ; do
+ printf $'\e[%s;1H\e[K%s' \
+ $((basta_scroll_lines + j)) "${LC_basta_status[i]}"
+ done
+ printf $'\e[=7h'
- printf '\e8'
+ printf $'\e8'
LC_basta_status[$basta_prev_reserved_rows]=$status
basta.export_array LC_basta_status