aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorYang Tang <tangyang.cn@gmail.com>2018-06-01 18:49:23 +0300
committerYang Tang <tangyang.cn@gmail.com>2018-06-01 18:49:23 +0300
commit2f95fd04d94a5b2fed33f17ecd1c1d7bab5ad44a (patch)
tree34740d290ca52c9248ddddadeaddb476691513cc /powerlevel9k.zsh-theme
parent0e3c1924fe40835dfe189227b8a165de147e65a1 (diff)
Fix icons cut off in some terminal emulators
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme8
1 files changed, 4 insertions, 4 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 0e09ef03..836d4ae0 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -156,12 +156,12 @@ left_prompt_segment() {
if [[ -n $6 ]]; then
visual_identifier="$(print_icon $6)"
if [[ -n "$visual_identifier" ]]; then
+ # Add an whitespace if we print more than just the visual identifier
+ [[ -n "$5" ]] && visual_identifier="$visual_identifier "
# 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 $4
visual_identifier="%F{${(P)visual_identifier_color_variable}%}$visual_identifier%f"
- # Add an whitespace if we print more than just the visual identifier
- [[ -n "$5" ]] && visual_identifier="$visual_identifier "
fi
fi
@@ -240,12 +240,12 @@ right_prompt_segment() {
if [[ -n "$6" ]]; then
visual_identifier="$(print_icon $6)"
if [[ -n "$visual_identifier" ]]; then
+ # Add an whitespace if we print more than just the visual identifier
+ [[ -n "$5" ]] && visual_identifier=" $visual_identifier"
# 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 $4
visual_identifier="%F{${(P)visual_identifier_color_variable}%}$visual_identifier%f"
- # Add an whitespace if we print more than just the visual identifier
- [[ -n "$5" ]] && visual_identifier=" $visual_identifier"
fi
fi