mirror of
https://github.com/junegunn/fzf.vim.git
synced 2026-10-08 13:05:17 +08:00
Name the preview variable in WSLENV
WSL shares only the variables listed there with a Windows vim.exe, as s:preview_cmd already does for MSWINHOME. Untested, no WSL here.
This commit is contained in:
1 file changed
+4
-1
+4
-1
@@ -35,7 +35,10 @@ fi
|
|||||||
# it cannot run a shell command or touch a file. ':sandbox' on its own only
|
# it cannot run a shell command or touch a file. ':sandbox' on its own only
|
||||||
# covers the command up to the first '|', hence 'sandbox execute' on a value
|
# covers the command up to the first '|', hence 'sandbox execute' on a value
|
||||||
# passed through the environment, which keeps the whole address inside
|
# passed through the environment, which keeps the whole address inside
|
||||||
CENTER="$(FZFVIM_EXCMD="${EXCMD}" "${VIMNAME}" -R -i NONE -u NONE -e -m -s "${FILE}" \
|
export FZFVIM_EXCMD="${EXCMD}"
|
||||||
|
# WSL shares only the variables named in WSLENV with a Windows vim.exe
|
||||||
|
export WSLENV="FZFVIM_EXCMD/w${WSLENV:+:${WSLENV}}"
|
||||||
|
CENTER="$("${VIMNAME}" -R -i NONE -u NONE -e -m -s "${FILE}" \
|
||||||
-c "set nomagic" \
|
-c "set nomagic" \
|
||||||
-c 'silent sandbox execute $FZFVIM_EXCMD' \
|
-c 'silent sandbox execute $FZFVIM_EXCMD' \
|
||||||
-c 'let l=line(".") | new | put =l | print | qa!')" || exit
|
-c 'let l=line(".") | new | put =l | print | qa!')" || exit
|
||||||
|
|||||||
Reference in new issue
Block a user