aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2025-02-14 12:20:19 -0800
committerKaz Kylheku <kaz@kylheku.com>2025-02-14 12:20:19 -0800
commit9a5e2ec30dc41145b6a3a4f74e0b3929c451a5c6 (patch)
treee1c837787ccb7cdbead78890cd65ebe945704c8b
parent82edc56b096ad21103551eaad899e217915c9fe3 (diff)
downloadbasta-9a5e2ec30dc41145b6a3a4f74e0b3929c451a5c6.tar.gz
basta-9a5e2ec30dc41145b6a3a4f74e0b3929c451a5c6.tar.bz2
basta-9a5e2ec30dc41145b6a3a4f74e0b3929c451a5c6.zip
Regression: clock not spontaneously updating.
* basta.sh (basta_executing): Don't preserve the value of this variable when reloading. Set it to y, and then blank at the end of the script when loading is about to end. This fixes the bug: we had the variable set to y, and so basta.interrupt was deferring signal handling. (basta.initial_prompt_hook): Bind basta_executing to y while running this funcion also, like basta.prompt_hook. (basta.fullscreen): Also here; while running any command, we don't need to handle ALRM signals, only while editing the command line.
-rw-r--r--basta.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/basta.sh b/basta.sh
index 1f4098c..15f8bda 100644
--- a/basta.sh
+++ b/basta.sh
@@ -11,7 +11,7 @@ basta_scroll_lines=${basta_scroll_lines-0}
basta_prev_reserved_rows=${basta_prev_reserved_rows-}
basta_status_alarm_pid=${basta_status_alarm_pid-}
-basta_executing=${basta_executing-y}
+basta_executing=y
basta_deferred_intr=${basta_deferred_intr-}
basta.query_terminal_lines()
@@ -191,6 +191,7 @@ basta.do_exit_status()
basta.initial_prompt_hook()
{
local exit=$?
+ local basta_executing=y
stty raw -echo onlcr opost
basta.update_status
stty sane
@@ -311,6 +312,7 @@ basta.fullscreen() {
return $?
fi
+ local basta_executing=y
local realrows=$(( LINES + basta_prev_reserved_rows + 1 ))
local curline
local i
@@ -365,6 +367,8 @@ basta.import_array LC_basta_status
# receives a SIGALRM, it emits cruft to the terminal.
bind 'set enable-bracketed-paste 0'
+basta_executing=
+
# Copyright 2023-2025
# Kaz Kylheku <kaz@kylheku.com>
# Vancouver, Canada