mirror of
https://github.com/junegunn/fzf.vim.git
synced 2026-09-30 07:32:23 +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:
+4
-1
@@ -35,7 +35,10 @@ fi
|
||||
# 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
|
||||
# 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 'silent sandbox execute $FZFVIM_EXCMD' \
|
||||
-c 'let l=line(".") | new | put =l | print | qa!')" || exit
|
||||
|
||||
Reference in New Issue
Block a user