aboutsummaryrefslogtreecommitdiff
path: root/internal/p10k.zsh
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-10-26 22:06:07 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-10-26 22:06:07 +0300
commitbdb18cbe2fc24e0304453da5964e7f2361295f86 (patch)
treecfc6fcc46c4cdd385a646ed5a6f063b4ad80cb84 /internal/p10k.zsh
parent01640fccba531866b94c65252b854eb1a7d520c9 (diff)
pick the correct default for PROMPT_EOL_MARK
Diffstat (limited to 'internal/p10k.zsh')
-rw-r--r--internal/p10k.zsh11
1 files changed, 6 insertions, 5 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 5a404d63..88481bbf 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -3627,10 +3627,10 @@ _p9k_dump_instant_prompt() {
print -rn -- $terminfo[rc]${(%):-%b%k%f%s%u}$terminfo[ed]
if [[ -s $__p9k_instant_prompt_output ]]; then
cat $__p9k_instant_prompt_output 2>/dev/null
- local _p9k_ret
- [[ $PROMPT_EOL_MARK == "%B%S%#%s%b" ]] && _p9k_ret=1 || _p9k_prompt_length $PROMPT_EOL_MARK
+ 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 - "${(%):-$PROMPT_EOL_MARK${(pl.$fill.. .)}$cr%b%k%f%s%u%E}"
+ echo -nE - "${(%):-$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
@@ -3783,9 +3783,10 @@ function _p9k_clear_instant_prompt() {
{
local content
[[ $_POWERLEVEL9K_INSTANT_PROMPT == verbose ]] && content="$(<$__p9k_instant_prompt_output)"
- _p9k_prompt_length $PROMPT_EOL_MARK
+ 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="${(%):-$PROMPT_EOL_MARK${(pl.$fill.. .)}$cr%b%k%f%s%u%E}"
+ local sp="${(%):-$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 - ""