aboutsummaryrefslogtreecommitdiff
path: root/internal/p10k.zsh
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-11-03 14:09:54 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-11-03 14:09:54 +0300
commitb6df93d2507c165490565fb055ff2c772f811a99 (patch)
tree6a0cab86cb4cb48e23ddd0228557369b55b39831 /internal/p10k.zsh
parent93b90d802971dd4a803aeac59960386575683ab7 (diff)
allow unset _p9k__{ruler,empty_line}_i
Diffstat (limited to 'internal/p10k.zsh')
-rw-r--r--internal/p10k.zsh8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index da015847..85baa6d6 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -4995,9 +4995,9 @@ _p9k_init_prompt() {
fi
_p9k_empty_line_idx=$#_p9k_t
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
- _p9k_prompt_prefix_left+='${_p9k_t[_p9k__empty_line_i]}'
+ _p9k_prompt_prefix_left+='${_p9k_t[${_p9k__empty_line_i:-'$#_p9k_t'}]}'
fi
_p9k_get_icon '' RULER_CHAR
@@ -5024,9 +5024,9 @@ _p9k_init_prompt() {
_p9k_t+=$ruler
_p9k_ruler_idx=$#_p9k_t
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
- _p9k_prompt_prefix_left+='${(e)_p9k_t[_p9k__ruler_i]}'
+ _p9k_prompt_prefix_left+='${(e)_p9k_t[${_p9k__ruler_i:-'$#_p9k_t'}]}'
fi
if [[ $ITERM_SHELL_INTEGRATION_INSTALLED == Yes ]]; then