summaryrefslogtreecommitdiff
path: root/internal/p10k.zsh
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-09-12 12:45:17 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-09-12 12:45:17 +0300
commit8554c755bd2b1c5c171c2ce963835d99b59814ed (patch)
treee542ea9181f386d602bd999bd28777c242c7a524 /internal/p10k.zsh
parent9c9039253c2da76e553c1cd2f4e822142bf708a9 (diff)
print new line(s) in precmd instead of embedding them in PROMPT
Diffstat (limited to 'internal/p10k.zsh')
-rwxr-xr-xinternal/p10k.zsh5
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index c60619f2..a77c7ebb 100755
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -3245,6 +3245,8 @@ _p9k_precmd() {
__p9k_new_pipestatus=($pipestatus)
if ! zle; then
+ print -rn ${_p9k_prompt_newline:-}
+
if (( $+_p9k_real_zle_rprompt_indent )); then
if [[ -n $_p9k_real_zle_rprompt_indent ]]; then
ZLE_RPROMPT_INDENT=$_p9k_real_zle_rprompt_indent
@@ -3532,6 +3534,7 @@ _p9k_init_vars() {
typeset -gi _p9k_g
typeset -gi _p9k_ind
typeset -g _p9k_gap_pre
+ typeset -g _p9k_prompt_newline
typeset -g _p9k_prompt_prefix_left
typeset -g _p9k_prompt_prefix_right
typeset -g _p9k_prompt_suffix_left
@@ -4061,7 +4064,7 @@ _p9k_init_prompt() {
fi
if (( _POWERLEVEL9K_PROMPT_ADD_NEWLINE )); then
- repeat $_POWERLEVEL9K_PROMPT_ADD_NEWLINE_COUNT _p9k_prompt_prefix_left+=$'\n'
+ repeat $_POWERLEVEL9K_PROMPT_ADD_NEWLINE_COUNT _p9k_prompt_newline+=$'\n'
fi
_p9k_t=($'\n' '')