aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-10-20 11:56:11 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-10-20 11:56:11 +0300
commit32f363a1b14616715a183a0eb06c83054ec0cdc8 (patch)
tree3b4d2ed1b2275eb42f4edf05accdd5737bd10d9b
parentcf2eef5556c8b8f94b49baa73048b5e525a8c7fe (diff)
move p10k-instant-prompt-finalize to the static source file
-rw-r--r--internal/p10k.zsh5
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index cefe53bb..190d36c0 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -3604,7 +3604,6 @@ _p9k_dump_instant_prompt() {
precmd_functions=(${(@)precmd_functions:#_p9k_instant_prompt_precmd_first})
}
precmd_functions=(_p9k_instant_prompt_precmd_first $precmd_functions)
- function p10k-instant-prompt-finalize() { unsetopt localoptions prompt_cr; }
} && unsetopt prompt_cr prompt_sp || true'
} always {
exec {fd}>&-
@@ -5342,6 +5341,10 @@ function p10k() {
# Hook for zplugin.
powerlevel10k_plugin_unload() { prompt_powerlevel9k_teardown; }
+function p10k-instant-prompt-finalize() {
+ (( ! __p9k_instant_prompt_active )) || unsetopt localoptions prompt_cr
+}
+
autoload -Uz add-zsh-hook
zmodload zsh/datetime