1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-11 00:00:06 +00:00

reset style before percent-expanding PROMPT_EOL_MARK

This commit is contained in:
romkatv 2019-10-26 21:11:39 +02:00
parent bdb18cbe2f
commit 28795b43ce

View file

@ -3591,7 +3591,7 @@ _p9k_dump_instant_prompt() {
>&$fd print -r -- '
[[ $PROMPT_EOL_MARK == "%B%S%#%s%b" ]] && _p9k_ret=1 || _p9k_prompt_length $PROMPT_EOL_MARK
local -i fill=$((COLUMNS > _p9k_ret ? COLUMNS - _p9k_ret : 0))
out+="${(%):-$PROMPT_EOL_MARK${(pl.$fill.. .)}$cr%b%k%f%s%u%E}"'
out+="${(%):-%b%k%f%s%u$PROMPT_EOL_MARK${(pl.$fill.. .)}$cr%b%k%f%s%u%E}"'
(( $+VTE_VERSION )) && >&$fd print -r -- ' fi'
>&$fd print -r -- '
out+="${(pl.$height..$lf.)}$esc${height}A$terminfo[sc]"
@ -3630,7 +3630,7 @@ _p9k_dump_instant_prompt() {
local _p9k_ret mark="${PROMPT_EOL_MARK-%B%S%#%s%b}"
_p9k_prompt_length $mark
local -i fill=$((COLUMNS > _p9k_ret ? COLUMNS - _p9k_ret : 0))
echo -nE - "${(%):-$mark${(pl.$fill.. .)}$cr%b%k%f%s%u%E}"
echo -nE - "${(%):-%b%k%f%s%u$mark${(pl.$fill.. .)}$cr%b%k%f%s%u%E}"
fi
zmodload -F zsh/files b:zf_rm
zf_rm -f -- $__p9k_instant_prompt_output ${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh{,.zwc} 2>/dev/null
@ -3786,7 +3786,7 @@ function _p9k_clear_instant_prompt() {
local mark="${PROMPT_EOL_MARK-%B%S%#%s%b}"
_p9k_prompt_length $mark
local -i fill=$((COLUMNS > _p9k_ret ? COLUMNS - _p9k_ret : 0))
local sp="${(%):-$mark${(pl.$fill.. .)}$cr%b%k%f%s%u%E}"
local sp="${(%):-%b%k%f%s%u$mark${(pl.$fill.. .)}$cr%b%k%f%s%u%E}"
print -rn -- $terminfo[rc]${(%):-%b%k%f%s%u}$terminfo[ed]
if [[ -n ${(S)content//$'\e'*$'\a'} ]]; then
echo -E - ""