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

allow unset _p9k__{ruler,empty_line}_i

This commit is contained in:
romkatv 2019-11-03 12:09:54 +01:00
parent 93b90d8029
commit b6df93d250

View file

@ -4995,9 +4995,9 @@ _p9k_init_prompt() {
fi fi
_p9k_empty_line_idx=$#_p9k_t _p9k_empty_line_idx=$#_p9k_t
if (( __p9k_ksh_arrays )); then if (( __p9k_ksh_arrays )); then
_p9k_prompt_prefix_left+='${_p9k_t[_p9k__empty_line_i-1]}' _p9k_prompt_prefix_left+='${_p9k_t[${_p9k__empty_line_i:-'$#_p9k_t'}-1]}'
else else
_p9k_prompt_prefix_left+='${_p9k_t[_p9k__empty_line_i]}' _p9k_prompt_prefix_left+='${_p9k_t[${_p9k__empty_line_i:-'$#_p9k_t'}]}'
fi fi
_p9k_get_icon '' RULER_CHAR _p9k_get_icon '' RULER_CHAR
@ -5024,9 +5024,9 @@ _p9k_init_prompt() {
_p9k_t+=$ruler _p9k_t+=$ruler
_p9k_ruler_idx=$#_p9k_t _p9k_ruler_idx=$#_p9k_t
if (( __p9k_ksh_arrays )); then if (( __p9k_ksh_arrays )); then
_p9k_prompt_prefix_left+='${(e)_p9k_t[_p9k__ruler_i-1]}' _p9k_prompt_prefix_left+='${(e)_p9k_t[${_p9k__ruler_i:-'$#_p9k_t'}-1]}'
else else
_p9k_prompt_prefix_left+='${(e)_p9k_t[_p9k__ruler_i]}' _p9k_prompt_prefix_left+='${(e)_p9k_t[${_p9k__ruler_i:-'$#_p9k_t'}]}'
fi fi
if [[ $ITERM_SHELL_INTEGRATION_INSTALLED == Yes ]]; then if [[ $ITERM_SHELL_INTEGRATION_INSTALLED == Yes ]]; then