aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--basta.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/basta.sh b/basta.sh
index d0afc20..5707e0e 100644
--- a/basta.sh
+++ b/basta.sh
@@ -39,6 +39,7 @@ basta.query_termios_lines_cols()
basta.prepare_term()
{
local realrows
+ local i
if ! basta.query_terminal_lines realrows; then
return 1
@@ -46,7 +47,11 @@ basta.prepare_term()
if [ -z "$basta_prev_reserved_rows" ] ; then
basta_prev_reserved_rows=${#LC_basta_status[@]}
- printf $'\n\e[A'
+ printf $'\e7\e[1;%sr\e8' $realrows
+ for (( i = 0; i <= basta_prev_reserved_rows; i++ )); do
+ printf $'\n'
+ done
+ printf $'\e[%sA' $i
fi
LINES=$((realrows - $basta_prev_reserved_rows - 1))