summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Perepelitsa <roman.perepelitsa@gmail.com>2020-11-15 11:41:55 +0300
committerRoman Perepelitsa <roman.perepelitsa@gmail.com>2020-11-15 11:41:55 +0300
commitf8ae544e6eca57177e471a08d076558e46060084 (patch)
treec072d2378588c78ef4b32f2fc76bae2bc7f33664
parent8488f7c75c34b7cd1d0f2868dc674197b74aede3 (diff)
properly restore prompt after SIGINT when transient prompt is disabled
-rw-r--r--internal/p10k.zsh15
1 files changed, 8 insertions, 7 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index d91519e3..78b3b3fb 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -7388,14 +7388,15 @@ function _p9k_on_widget_zle-line-finish() {
fi
fi
- if (( __p9k_reset_state == 2 )); then
- if [[ $1 == int ]]; then
- _p9k__must_restore_prompt=1
- if (( !_p9k__restore_prompt_fd )); then
- sysopen -o cloexec -ru _p9k__restore_prompt_fd /dev/null
- zle -F $_p9k__restore_prompt_fd _p9k_restore_prompt
- fi
+ if [[ $1 == int ]]; then
+ _p9k__must_restore_prompt=1
+ if (( !_p9k__restore_prompt_fd )); then
+ sysopen -o cloexec -ru _p9k__restore_prompt_fd /dev/null
+ zle -F $_p9k__restore_prompt_fd _p9k_restore_prompt
fi
+ fi
+
+ if (( __p9k_reset_state == 2 )); then
if (( optimized )); then
RPROMPT= PROMPT=$_p9k_transient_prompt _p9k_reset_prompt
else