mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-06 20:54:28 +08:00
[fzf#vim#preview] Respect $BAT_STYLE (#953)
This commit is contained in:
@@ -47,7 +47,7 @@ FIRST=$(($FIRST < 1 ? 1 : $FIRST))
|
|||||||
LAST=$((${FIRST}+${LINES}-1))
|
LAST=$((${FIRST}+${LINES}-1))
|
||||||
|
|
||||||
if [ -z "$FZF_PREVIEW_COMMAND" ] && command -v bat > /dev/null; then
|
if [ -z "$FZF_PREVIEW_COMMAND" ] && command -v bat > /dev/null; then
|
||||||
bat --style=numbers --color=always --pager=never \
|
bat --style="${BAT_STYLE:-numbers}" --color=always --pager=never \
|
||||||
--line-range=$FIRST:$LAST --highlight-line=$CENTER "$FILE"
|
--line-range=$FIRST:$LAST --highlight-line=$CENTER "$FILE"
|
||||||
exit $?
|
exit $?
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user