diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2019-05-01 13:17:27 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2019-05-01 13:17:27 +0300 |
commit | 902e8eb24d93561238475dbf300fa8f1f76f3fe8 (patch) | |
tree | 96a2a69891d53c8afd7b0da80a7e01fb1a6d770a /powerlevel9k.zsh-theme | |
parent | 1f8cd36f734d9fe74e01f12f0ef17e9adf79459c (diff) |
bug fix: show previous repo state instead of loading when in a subdir of a slow repo
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 4b3af9ab..01d6c973 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -1685,16 +1685,17 @@ function _p9k_vcs_render() { local dir=${${GIT_DIR:a}:-$PWD} while true; do msg=("${(@0)${_P9K_LAST_GIT_PROMPT[$dir]}}") - [[ $#msg != 0 || $dir == / ]] && break + [[ $#msg -gt 1 || -n ${msg[1]} ]] && break + [[ $dir == / ]] && msg=() && break dir=${dir:h} done - if [[ $#msg -lt 2 && -z ${msg[1]} ]]; then + if (( $#msg )); then + $2_prompt_segment $1_LOADING $3 "${vcs_states[loading]}" "$DEFAULT_COLOR" '' 0 '' "${msg[@]}" + else _p9k_get_icon VCS_LOADING_ICON if [[ -n $_P9K_RETVAL || -n $POWERLEVEL9K_VCS_LOADING_TEXT ]]; then $2_prompt_segment $1_LOADING $3 "${vcs_states[loading]}" "$DEFAULT_COLOR" VCS_LOADING_ICON 0 '' "$POWERLEVEL9K_VCS_LOADING_TEXT" fi - else - $2_prompt_segment $1_LOADING $3 "${vcs_states[loading]}" "$DEFAULT_COLOR" '' 0 '' "${msg[@]}" fi return 0 fi |