mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-16 17:50:09 +00:00
correctly handle ZLE_RPROMPT_INDENT changes
This commit is contained in:
parent
5d7eaaa172
commit
1402ca55b1
1 changed files with 11 additions and 3 deletions
|
@ -2884,12 +2884,13 @@ prompt_java_version() {
|
||||||
}
|
}
|
||||||
|
|
||||||
powerlevel9k_preexec() {
|
powerlevel9k_preexec() {
|
||||||
if (( _p9k_emulate_zero_rprompt_indent )); then
|
if (( $+_p9k_real_zle_rprompt_indent )); then
|
||||||
if [[ -n $_p9k_real_zle_rprompt_indent ]]; then
|
if [[ -n $_p9k_real_zle_rprompt_indent ]]; then
|
||||||
ZLE_RPROMPT_INDENT=$_p9k_real_zle_rprompt_indent
|
ZLE_RPROMPT_INDENT=$_p9k_real_zle_rprompt_indent
|
||||||
else
|
else
|
||||||
unset ZLE_RPROMPT_INDENT
|
unset ZLE_RPROMPT_INDENT
|
||||||
fi
|
fi
|
||||||
|
unset _p9k_real_zle_rprompt_indent
|
||||||
fi
|
fi
|
||||||
__p9k_timer_start=EPOCHREALTIME
|
__p9k_timer_start=EPOCHREALTIME
|
||||||
}
|
}
|
||||||
|
@ -2981,7 +2982,6 @@ function _p9k_set_prompt() {
|
||||||
PROMPT+=$_p9k_prompt_suffix_left
|
PROMPT+=$_p9k_prompt_suffix_left
|
||||||
[[ -n $RPROMPT ]] && RPROMPT=$_p9k_prompt_prefix_right$RPROMPT$_p9k_prompt_suffix_right
|
[[ -n $RPROMPT ]] && RPROMPT=$_p9k_prompt_prefix_right$RPROMPT$_p9k_prompt_suffix_right
|
||||||
|
|
||||||
_p9k_real_zle_rprompt_indent=
|
|
||||||
(( $#_p9k_cache < _POWERLEVEL9K_MAX_CACHE_SIZE )) || _p9k_cache=()
|
(( $#_p9k_cache < _POWERLEVEL9K_MAX_CACHE_SIZE )) || _p9k_cache=()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3005,6 +3005,15 @@ powerlevel9k_prepare_prompts() {
|
||||||
__p9k_pipe_exit_codes=( $pipestatus )
|
__p9k_pipe_exit_codes=( $pipestatus )
|
||||||
__p9k_timer_end=EPOCHREALTIME
|
__p9k_timer_end=EPOCHREALTIME
|
||||||
|
|
||||||
|
if (( $+_p9k_real_zle_rprompt_indent )); then
|
||||||
|
if [[ -n $_p9k_real_zle_rprompt_indent ]]; then
|
||||||
|
ZLE_RPROMPT_INDENT=$_p9k_real_zle_rprompt_indent
|
||||||
|
else
|
||||||
|
unset ZLE_RPROMPT_INDENT
|
||||||
|
fi
|
||||||
|
unset _p9k_real_zle_rprompt_indent
|
||||||
|
fi
|
||||||
|
|
||||||
_p9k_must_init && _p9k_init
|
_p9k_must_init && _p9k_init
|
||||||
|
|
||||||
unsetopt localoptions
|
unsetopt localoptions
|
||||||
|
@ -3214,7 +3223,6 @@ _p9k_init_vars() {
|
||||||
typeset -gi _p9k_segment_index
|
typeset -gi _p9k_segment_index
|
||||||
typeset -g _p9k_refresh_reason
|
typeset -g _p9k_refresh_reason
|
||||||
typeset -gi _p9k_region_active
|
typeset -gi _p9k_region_active
|
||||||
typeset -g _p9k_real_zle_rprompt_indent
|
|
||||||
typeset -g _p9k_async_pump_line
|
typeset -g _p9k_async_pump_line
|
||||||
typeset -g _p9k_async_pump_fifo
|
typeset -g _p9k_async_pump_fifo
|
||||||
typeset -g _p9k_async_pump_lock
|
typeset -g _p9k_async_pump_lock
|
||||||
|
|
Loading…
Reference in a new issue