diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2015-12-15 03:31:55 +0300 |
---|---|---|
committer | Dominik Ritter <dritter03@googlemail.com> | 2015-12-15 04:08:59 +0300 |
commit | 78d22ba309171889e79fa486b9f7aa882b4d8001 (patch) | |
tree | 70da84c37bdcf1b012cef7951c691cb8a3987f8e /powerlevel9k.zsh-theme | |
parent | 6f7d6f7259d33233288dca3b5657c89550023389 (diff) |
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.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 3 |
1 files changed, 1 insertions, 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 |