Cache tide_prompt_color_separator_same_color

This commit is contained in:
Ilan Cosman 2021-10-09 14:53:22 -07:00
parent 3e7b702ae0
commit 3f46f36c8a
2 changed files with 4 additions and 2 deletions

View File

@ -15,6 +15,9 @@ function _tide_cache_variables
set -e _tide_private_mode
end
# Same-color-separator color
set -gx _tide_color_separator_same_color "$(set_color $tide_prompt_color_separator_same_color)"
# two line prompt
if contains newline $tide_left_prompt_items
set_color $tide_prompt_color_frame_and_connection -b normal | read -gx _tide_prompt_and_frame_color

View File

@ -5,8 +5,7 @@ function _tide_print_item -a item
set_color $item_bg_color -b normal
var=tide_"$_tide_side"_prompt_prefix echo -ns $$var
else if test "$item_bg_color" = "$prev_bg_color"
set_color $tide_prompt_color_separator_same_color
var=tide_"$_tide_side"_prompt_separator_same_color echo -ns $$var
var=tide_"$_tide_side"_prompt_separator_same_color echo -ns $_tide_color_separator_same_color$$var
else if test "$_tide_side" = left
set_color $prev_bg_color -b $item_bg_color
echo -ns $tide_left_prompt_separator_diff_color