From 9a5e2ec30dc41145b6a3a4f74e0b3929c451a5c6 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 14 Feb 2025 12:20:19 -0800 Subject: 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. --- basta.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 # Vancouver, Canada -- cgit v1.2.3