aboutsummaryrefslogtreecommitdiff
path: root/internal/p10k.zsh
diff options
context:
space:
mode:
authorRoman Perepelitsa <roman.perepelitsa@gmail.com>2020-11-15 11:19:25 +0300
committerRoman Perepelitsa <roman.perepelitsa@gmail.com>2020-11-15 11:19:25 +0300
commit8488f7c75c34b7cd1d0f2868dc674197b74aede3 (patch)
treebf5f47d59cb3434b8b6e457361a5c2a00c209670 /internal/p10k.zsh
parentfeaf120ddc25279d6efa52ef4aecb7d14504064f (diff)
set P9K_PROMPT=transient for the duration of zle-line-finish (#1105)
Diffstat (limited to 'internal/p10k.zsh')
-rw-r--r--internal/p10k.zsh7
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 845bd970..d91519e3 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -3934,7 +3934,8 @@ function _p9k_vcs_resume() {
}
function _p9k_vcs_gitstatus() {
- if [[ $_p9k__refresh_reason == precmd ]]; then
+ if [[ $_p9k__refresh_reason == precmd ]] && (( !_p9k__vcs_called )); then
+ typeset -gi _p9k__vcs_called=1
if (( $+_p9k__gitstatus_next_dir )); then
_p9k__gitstatus_next_dir=$_p9k__cwd_a
else
@@ -5597,6 +5598,8 @@ _p9k_prompt_net_iface_sync() {
}
function _p9k_set_prompt() {
+ local -i _p9k__vcs_called
+
PROMPT=
RPROMPT=
[[ $1 == instant_ ]] || PROMPT+='${$((_p9k_on_expand()))+}'
@@ -7368,6 +7371,8 @@ function _p9k_on_widget_zle-line-init() {
function _p9k_on_widget_zle-line-finish() {
(( $+_p9k__line_finished )) && return
+ local P9K_PROMPT=transient
+
_p9k__line_finished=
(( _p9k_reset_on_line_finish )) && __p9k_reset_state=2
(( $+functions[p10k-on-post-prompt] )) && p10k-on-post-prompt