From 78d22ba309171889e79fa486b9f7aa882b4d8001 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Tue, 15 Dec 2015 01:31:55 +0100 Subject: Interesting: We don't need to swap the whitespaces if the visual identifier should be rendered on the right side, because the terminal gets printed from left to right and the double width characters need their "print me right"-whitespaces on the right side anyways. --- powerlevel9k.zsh-theme | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 4657d3e5..25a9f0e0 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -223,8 +223,7 @@ right_prompt_segment() { local visual_identifier if [[ -n $5 ]]; then - # Swap the spaces around an icon if the icon is displayed on the right side. - visual_identifier=$(print_icon $5 | sed -E "s/( *)([^ ]*)( *)/\3\2\1/") + visual_identifier="$(print_icon $5)" # Allow users to overwrite the color for the visual identifier only. local visual_identifier_color_variable=POWERLEVEL9K_${(U)1#prompt_}_VISUAL_IDENTIFIER_COLOR set_default $visual_identifier_color_variable $fg -- cgit v1.2.3