mirror of
https://github.com/Aloxaf/fzf-tab.git
synced 2026-09-10 07:26:16 -04:00
fix: append SGR reset to dsuf to prevent background color bleed (#570)
In lib/-ftb-colorize, the color opened in dpre was never closed in dsuf, causing background colors (e.g. from vivid LS_COLORS themes) to bleed into the first character of the following entry in the fzf list. - Symlink branch: append \033[0m after the resolved path in dsuf - Non-symlink branch: prepend \033[0m to dsuf Note: the C module (fzf-tab-candidates-generate builtin) already appends \033[0m to dsuf in fzftab.c:454 so it is unaffected. Fixes: #563
This commit is contained in:
parent
d7e0234614
commit
0983009f86
|
|
@ -28,7 +28,8 @@ if [[ -n $lstat[14] ]]; then
|
|||
rsv_color=$REPLY
|
||||
fi
|
||||
dpre=$'\033[0m\033['$sym_color'm'
|
||||
dsuf+=$'\033[0m -> \033['$rsv_color'm'$rsv
|
||||
dsuf+=$'\033[0m -> \033['$rsv_color'm'$rsv$'\033[0m'
|
||||
else
|
||||
dpre=$'\033[0m\033['$REPLY'm'
|
||||
dsuf=$'\033[0m'$dsuf
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue