mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2025-02-16 15:54:29 +01:00
bug fix: never render subsegment separator with the same fg and bg
This commit is contained in:
parent
3881677ed8
commit
0ad3a452ef
1 changed files with 14 additions and 6 deletions
|
@ -286,8 +286,12 @@ left_prompt_segment() {
|
||||||
local t=$#_P9K_T
|
local t=$#_P9K_T
|
||||||
_P9K_T+=$start_sep$style$left_space # 1
|
_P9K_T+=$start_sep$style$left_space # 1
|
||||||
_P9K_T+=$style # 2
|
_P9K_T+=$style # 2
|
||||||
if [[ -z $fg_color ]]; then
|
if [[ -n $fg_color && $fg_color == $bg_color ]]; then
|
||||||
_p9k_foreground $DEFAULT_COLOR
|
if [[ $fg_color == $DEFAULT_COLOR ]]; then
|
||||||
|
_p9k_foreground $DEFAULT_COLOR_INVERTED
|
||||||
|
else
|
||||||
|
_p9k_foreground $DEFAULT_COLOR
|
||||||
|
fi
|
||||||
_P9K_T+=%b$bg$_P9K_RETVAL$ss$style$left_space # 3
|
_P9K_T+=%b$bg$_P9K_RETVAL$ss$style$left_space # 3
|
||||||
else
|
else
|
||||||
_P9K_T+=%b$bg$fg$ss$style$left_space # 3
|
_P9K_T+=%b$bg$fg$ss$style$left_space # 3
|
||||||
|
@ -443,11 +447,15 @@ right_prompt_segment() {
|
||||||
local t=$#_P9K_T
|
local t=$#_P9K_T
|
||||||
_P9K_T+=$start_sep$style$left_space # 1
|
_P9K_T+=$start_sep$style$left_space # 1
|
||||||
_P9K_T+=$w$style # 2
|
_P9K_T+=$w$style # 2
|
||||||
if [[ -z $fg_color ]]; then
|
if [[ -n $fg_color && $fg_color == $bg_color ]]; then
|
||||||
_p9k_foreground $DEFAULT_COLOR
|
if [[ $fg_color == $DEFAULT_COLOR ]]; then
|
||||||
_P9K_T+=$w%b$bg$_P9K_RETVAL$subsep$style$left_space # 3
|
_p9k_foreground $DEFAULT_COLOR_INVERTED
|
||||||
|
else
|
||||||
|
_p9k_foreground $DEFAULT_COLOR
|
||||||
|
fi
|
||||||
|
_P9K_T+=$w$_P9K_RETVAL$subsep$style$left_space # 3
|
||||||
else
|
else
|
||||||
_P9K_T+=$w%b$bg$fg$subsep$style$left_space # 3
|
_P9K_T+=$w$fg$subsep$style$left_space # 3
|
||||||
fi
|
fi
|
||||||
_P9K_T+=$w%F{$bg_color}$sep$style$left_space # 4
|
_P9K_T+=$w%F{$bg_color}$sep$style$left_space # 4
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue