Cache item padding

This commit is contained in:
Ilan Cosman 2021-09-22 13:35:33 -07:00
parent 08e1fcc9b5
commit 6f44ec078e
2 changed files with 8 additions and 5 deletions

View File

@ -21,4 +21,11 @@ function _tide_cache_variables
else
set -e _tide_add_newline
end
# item padding
if test "$tide_prompt_pad_items" = true
set -gx _tide_pad ' '
else
set -e _tide_pad
end
end

View File

@ -17,11 +17,7 @@ function _tide_print_item -a item
var=tide_"$item"_color set_color $$var -b $item_bg_color
if test "$tide_prompt_pad_items" = true
echo -ns ' ' $argv[2..] ' '
else
echo -ns $argv[2..]
end
echo -ns $_tide_pad $argv[2..] $_tide_pad
set -g _tide_previous_bg_color $item_bg_color
end