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

POWERLEVEL9K_VCS_MAX_NUM_STAGED => POWERLEVEL9K_VCS_STAGED_MAX_NUM (with temp fallback)

This commit is contained in:
romkatv 2019-05-29 12:51:18 +02:00
parent 473c5c45c3
commit a4b0fd6114

View file

@ -1823,17 +1823,17 @@ function _p9k_vcs_render() {
fi
if [[ $VCS_STATUS_HAS_STAGED == 1 ]]; then
_p9k_get_icon VCS_STAGED_ICON
(( POWERLEVEL9K_VCS_MAX_NUM_STAGED != 1 )) && _P9K_RETVAL+=$VCS_STATUS_NUM_STAGED
(( ${POWERLEVEL9K_VCS_MAX_NUM_STAGED:-$POWERLEVEL9K_VCS_STAGED_MAX_NUM} != 1 )) && _P9K_RETVAL+=$VCS_STATUS_NUM_STAGED
_$0_fmt STAGED " $_P9K_RETVAL"
fi
if [[ $VCS_STATUS_HAS_UNSTAGED == 1 ]]; then
_p9k_get_icon VCS_UNSTAGED_ICON
(( POWERLEVEL9K_VCS_MAX_NUM_UNSTAGED != 1 )) && _P9K_RETVAL+=$VCS_STATUS_NUM_UNSTAGED
(( ${POWERLEVEL9K_VCS_MAX_NUM_UNSTAGED:-$POWERLEVEL9K_VCS_UNSTAGED_MAX_NUM} != 1 )) && _P9K_RETVAL+=$VCS_STATUS_NUM_UNSTAGED
_$0_fmt UNSTAGED " $_P9K_RETVAL"
fi
if [[ $VCS_STATUS_HAS_UNTRACKED == 1 ]]; then
_p9k_get_icon VCS_UNTRACKED_ICON
(( POWERLEVEL9K_VCS_MAX_NUM_UNTRACKED != 1 )) && _P9K_RETVAL+=$VCS_STATUS_NUM_UNTRACKED
(( ${POWERLEVEL9K_VCS_MAX_NUM_UNTRACKED:-$POWERLEVEL9K_VCS_UNTRACKED_MAX_NUM} != 1 )) && _P9K_RETVAL+=$VCS_STATUS_NUM_UNTRACKED
_$0_fmt UNTRACKED " $_P9K_RETVAL"
fi
if [[ $VCS_STATUS_COMMITS_AHEAD -gt 0 ]]; then
@ -2238,9 +2238,9 @@ set_default POWERLEVEL9K_IGNORE_TERM_COLORS false
set_default POWERLEVEL9K_IGNORE_TERM_LANG false
set_default POWERLEVEL9K_DISABLE_GITSTATUS false
set_default -i POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY -1
set_default -i POWERLEVEL9K_VCS_MAX_NUM_STAGED 1
set_default -i POWERLEVEL9K_VCS_MAX_NUM_UNSTAGED 1
set_default -i POWERLEVEL9K_VCS_MAX_NUM_UNTRACKED 1
set_default -i POWERLEVEL9K_VCS_STAGED_MAX_NUM 1
set_default -i POWERLEVEL9K_VCS_UNSTAGED_MAX_NUM 1
set_default -i POWERLEVEL9K_VCS_UNTRACKED_MAX_NUM 1
typeset -g DEFAULT_COLOR
typeset -g DEFAULT_COLOR_INVERTED
@ -2556,11 +2556,11 @@ _p9k_init() {
powerlevel9k_vcs_init
if [[ $POWERLEVEL9K_DISABLE_GITSTATUS != true ]] && (( ${POWERLEVEL9K_VCS_BACKENDS[(I)git]} )); then
source ${POWERLEVEL9K_GITSTATUS_DIR:-${_P9K_INSTALLATION_DIR}/gitstatus}/gitstatus.plugin.zsh
gitstatus_start \
-s $POWERLEVEL9K_VCS_MAX_NUM_STAGED \
-u $POWERLEVEL9K_VCS_MAX_NUM_UNSTAGED \
-d $POWERLEVEL9K_VCS_MAX_NUM_UNTRACKED \
-m $POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY \
gitstatus_start \
-s ${POWERLEVEL9K_VCS_MAX_NUM_STAGED:-$POWERLEVEL9K_VCS_STAGED_MAX_NUM} \
-u ${POWERLEVEL9K_VCS_MAX_NUM_UNSTAGED:-$POWERLEVEL9K_VCS_UNSTAGED_MAX_NUM} \
-d ${POWERLEVEL9K_VCS_MAX_NUM_UNTRACKED:-POWERLEVEL9K_VCS_UNTRACKED_MAX_NUM} \
-m $POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY \
POWERLEVEL9K
fi
fi