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

transient_rprompt hides gap

This commit is contained in:
romkatv 2019-10-29 12:34:00 +01:00
parent 806ec183ff
commit 37fbc8c7ea

View file

@ -3952,13 +3952,13 @@ _p9k_precmd_impl() {
if zle; then
__p9k_new_status=0
__p9k_new_pipestatus=(0)
fi
else
print -rn "${_p9k_prompt_newline:-}"
fi
if (( _p9k__transient_rprompt_active )); then
_p9k__transient_rprompt_active=0
unset __p9k_x_right
unset __p9k_x_right __p9k_x_gap
fi
if (( $+_p9k_real_zle_rprompt_indent )); then
@ -4706,6 +4706,7 @@ function _p9k_zle_line_finish() {
_p9k__line_finished=
if [[ -o transient_rprompt ]]; then
__p9k_x_right=
__p9k_x_gap=
_p9k__transient_rprompt_active=1
_p9k_reset_prompt
elif (( _p9k_reset_on_line_finish )); then
@ -4942,6 +4943,9 @@ _p9k_init_prompt() {
if (( _p9k_ret == 1 && $#ruler_char == 1 )); then
_p9k_prompt_prefix_left+=$'${${__p9k_x_ruler+\n}:-'
_p9k_color prompt_ruler BACKGROUND ""
if [[ -z $_p9k_ret && $ruler_char == ' ' ]]; then
_p9k_prompt_prefix_left+=$'\n'
else
_p9k_background $_p9k_ret
_p9k_escape_style $_p9k_ret
_p9k_prompt_prefix_left+=%b$_p9k_ret
@ -4957,6 +4961,7 @@ _p9k_init_prompt() {
else
_p9k_prompt_prefix_left+='${_p9k_t[$((1+!_p9k_ind))]}'
fi
fi
_p9k_prompt_prefix_left+='}'
else
print -rP -- "%F{red}WARNING!%f %BPOWERLEVEL9K_RULER_CHAR%b is not one character long. Ruler won't be rendered."
@ -5014,7 +5019,7 @@ _p9k_must_init() {
[[ $sig == $_p9k__param_sig ]] && return 1
_p9k_deinit
fi
_p9k__param_pat=$'v1\1'${ZSH_VERSION}$'\1'${ZSH_PATCHLEVEL}$'\1'
_p9k__param_pat=$'v2\1'${ZSH_VERSION}$'\1'${ZSH_PATCHLEVEL}$'\1'
_p9k__param_pat+=$'${#parameters[(I)POWERLEVEL9K_*]}\1${(%):-%n%#}\1$GITSTATUS_LOG_LEVEL\1'
_p9k__param_pat+=$'$GITSTATUS_ENABLE_LOGGING\1$GITSTATUS_DAEMON\1$GITSTATUS_NUM_THREADS\1'
_p9k__param_pat+=$'$DEFAULT_USER\1${ZLE_RPROMPT_INDENT:-1}\1$P9K_SSH\1$__p9k_ksh_arrays'