mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-16 17:50:09 +00:00
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.
This commit is contained in:
parent
6f7d6f7259
commit
78d22ba309
1 changed files with 1 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue