aboutsummaryrefslogtreecommitdiff
path: root/internal/p10k.zsh
diff options
context:
space:
mode:
authorRoman Perepelitsa <roman.perepelitsa@gmail.com>2021-08-28 11:14:37 +0300
committerRoman Perepelitsa <roman.perepelitsa@gmail.com>2021-08-28 11:14:37 +0300
commitb3b0efb69f5b7817490aa9163ca44b40699b2bcc (patch)
tree95c51f2a962ce46bb199b2e136228a8ae0e8b00d /internal/p10k.zsh
parente362b697355c99d164217c62b051a441b9bcd8f2 (diff)
work around bugs in terminals and window managers by essentially disabling prompt_sp (but keeping prompt_cr) in instant prompt for new TTYs
Diffstat (limited to 'internal/p10k.zsh')
-rw-r--r--internal/p10k.zsh10
1 files changed, 6 insertions, 4 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 46326f35..c50292f2 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -5906,7 +5906,7 @@ _p9k_set_instant_prompt() {
[[ -n $RPROMPT ]] || unset RPROMPT
}
-typeset -gri __p9k_instant_prompt_version=41
+typeset -gri __p9k_instant_prompt_version=42
_p9k_dump_instant_prompt() {
local user=${(%):-%n}
@@ -6172,12 +6172,14 @@ _p9k_dump_instant_prompt() {
fi
typeset -g _p9k__ret=$x
}
- local out
- if [[ $+VTE_VERSION == 0 && $TERM_PROGRAM != Hyper ]] || (( ! $+_p9k__g )); then
+ local out=${(%):-%b%k%f%s%u}
+ if [[ $P9K_TTY == old && ( $+VTE_VERSION == 0 && $TERM_PROGRAM != Hyper || $+_p9k__g == 0 ) ]]; then
local mark=${(e)PROMPT_EOL_MARK}
[[ $mark == "%B%S%#%s%b" ]] && _p9k__ret=1 || _p9k_prompt_length $mark
local -i fill=$((COLUMNS > _p9k__ret ? COLUMNS - _p9k__ret : 0))
- out+="${(%):-%b%k%f%s%u$mark${(pl.$fill.. .)}$cr%b%k%f%s%u%E}"
+ out+="${(%):-$mark${(pl.$fill.. .)}$cr%b%k%f%s%u%E}"
+ else
+ out+="${(%):-$cr%E}"
fi
if (( _z4h_can_save_restore_screen != 1 )); then
(( height )) && out+="${(pl.$height..$lf.)}$esc${height}A"