aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-03-08 16:24:42 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-03-08 16:24:42 +0300
commitaad33010499fa2f82d9dedbef4ca415fdb98c354 (patch)
tree88d663a07359b3bd5ebd5c53b5bb7bbe1c088d97
parentab913d893094453ed8a077fa1fd08d444012f565 (diff)
do not reset prompt after prompt_powerlevel9k_teardown
-rwxr-xr-xpowerlevel9k.zsh-theme4
1 files changed, 4 insertions, 0 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index d716b044..4f0f5552 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -2088,6 +2088,7 @@ typeset -fH _p9k_set_prompts() {
}
typeset -fH _p9k_reset_prompts() {
+ [[ $_P9K_LOADED == true ]] || return
typeset -gH _P9K_REFRESH_PROMPT=''
_p9k_set_prompts
unset _P9K_REFRESH_PROMPT
@@ -2182,6 +2183,8 @@ prompt_powerlevel9k_setup() {
local -i max_dirty=${POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY:--1}
[[ $POWERLEVEL9K_DISABLE_GITSTATUS == true ]] || gitstatus_start -m $max_dirty POWERLEVEL9K
+
+ _P9K_LOADED=true
}
prompt_powerlevel9k_teardown() {
@@ -2189,6 +2192,7 @@ prompt_powerlevel9k_teardown() {
add-zsh-hook -D preexec powerlevel9k_\*
PROMPT='%m%# '
RPROMPT=
+ _P9K_LOADED=false
}
prompt_powerlevel9k_setup "$@"