diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2018-06-07 02:36:56 +0300 |
---|---|---|
committer | Dominik Ritter <dritter03@googlemail.com> | 2018-06-07 02:51:16 +0300 |
commit | d9d9fb9b6b9ede92fe76682c0fa4e03a29853695 (patch) | |
tree | 4fceb0d6b41f5b992cb92f14bcf209881010e10b /powerlevel9k.zsh-theme | |
parent | 5eedb2586be2c0107ebd159d50833664c612ce69 (diff) | |
parent | 9c4203bdf80440b43b5f559b5d8856f6b817ad9e (diff) |
Merge remote-tracking branch 'ytang/fix-icons-cut-off' into staging_065
Conflicts were:
- test/segments/command_execution_time.spec and
test/segments/go_version.spec: All conflicts come from renaming color
names on next (#703) and adding a whitespace to the Visual Identifier
(#854) on master.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index df42a60e..b9119d4c 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -156,12 +156,14 @@ 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. + # To avoid cutting off the visual identifier in some terminal emulators (e.g., Konsole, st), + # we need to color both the visual identifier and the whitespace. + [[ -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 @@ -241,12 +243,14 @@ 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. + # To avoid cutting off the visual identifier in some terminal emulators (e.g., Konsole, st), + # we need to color both the visual identifier and the whitespace. + [[ -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 |