From 65065ab6581b3a143284ee33a00ab0c47389575b Mon Sep 17 00:00:00 2001 From: romkatv Date: Fri, 13 Mar 2020 09:28:55 +0100 Subject: [PATCH] add POWERLEVEL9K_ICON_PADDING; the only value that has effect is "none" --- internal/icons.zsh | 12 +++++++++++- internal/p10k.zsh | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/internal/icons.zsh b/internal/icons.zsh index 2165510f..c07cc626 100644 --- a/internal/icons.zsh +++ b/internal/icons.zsh @@ -2,7 +2,7 @@ typeset -gA icons function _p9k_init_icons() { [[ $+_p9k__icon_mode == 1 && $_p9k__icon_mode == $POWERLEVEL9K_MODE/$POWERLEVEL9K_LEGACY_ICON_SPACING ]] && return - typeset -g _p9k__icon_mode=$POWERLEVEL9K_MODE/$POWERLEVEL9K_LEGACY_ICON_SPACING + typeset -g _p9k__icon_mode=$POWERLEVEL9K_MODE/$POWERLEVEL9K_LEGACY_ICON_SPACING/$POWERLEVEL9K_ICON_PADDING if [[ $POWERLEVEL9K_LEGACY_ICON_SPACING == true ]]; then local s= @@ -785,6 +785,16 @@ function _p9k_init_icons() { icons[VCS_BRANCH_ICON]='@' ;; esac + + if [[ $POWERLEVEL9K_ICON_PADDING == none ]]; then + icons=("${(@kv)icons%% #}") + icons[LEFT_SEGMENT_END_SEPARATOR]+=' ' + icons[MULTILINE_LAST_PROMPT_PREFIX]+=' ' + icons[VCS_TAG_ICON]+=' ' + icons[VCS_COMMIT_ICON]+=' ' + icons[VCS_BRANCH_ICON]+=' ' + icons[VCS_REMOTE_BRANCH_ICON]+=' ' + fi } # Sadly, this is a part of public API. Its use is emphatically discouraged. diff --git a/internal/p10k.zsh b/internal/p10k.zsh index f517c040..484fd346 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -7497,7 +7497,7 @@ _p9k_must_init() { [[ $sig == $_p9k__param_sig ]] && return 1 _p9k_deinit fi - _p9k__param_pat=$'v72\1'${ZSH_VERSION}$'\1'${ZSH_PATCHLEVEL}$'\1' + _p9k__param_pat=$'v73\1'${ZSH_VERSION}$'\1'${ZSH_PATCHLEVEL}$'\1' _p9k__param_pat+=$'${#parameters[(I)POWERLEVEL9K_*]}\1${(%):-%n%#}\1$GITSTATUS_LOG_LEVEL\1' _p9k__param_pat+=$'$GITSTATUS_ENABLE_LOGGING\1$GITSTATUS_DAEMON\1$GITSTATUS_NUM_THREADS\1' _p9k__param_pat+=$'$DEFAULT_USER\1${ZLE_RPROMPT_INDENT:-1}\1$P9K_SSH\1$__p9k_ksh_arrays\1'