From 5bd80d88f116c2b8cc6c94c327db1c790b687a3e Mon Sep 17 00:00:00 2001 From: romkatv Date: Tue, 26 Mar 2019 15:29:31 +0100 Subject: [PATCH] check for joined segments when figuring out whether vcs is enabled; fixes #41 --- functions/utilities.zsh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/functions/utilities.zsh b/functions/utilities.zsh index 0d04413e..c30fa096 100755 --- a/functions/utilities.zsh +++ b/functions/utilities.zsh @@ -79,8 +79,10 @@ printSizeHumanReadable() { # * $1: The segment to be tested. segment_in_use() { local key=$1 - [[ -n "${POWERLEVEL9K_LEFT_PROMPT_ELEMENTS[(r)$key]}" || - -n "${POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS[(r)$key]}" ]] + [[ -n "${POWERLEVEL9K_LEFT_PROMPT_ELEMENTS[(r)${key}]}" || + -n "${POWERLEVEL9K_LEFT_PROMPT_ELEMENTS[(r)${key}_joined]}" || + -n "${POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS[(r)${key}]}" || + -n "${POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS[(r)${key}_joined]}" ]] } ################################################################