summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Edmund Lazo <janedmundlazo@hotmail.com>2017-08-21 21:54:33 -0400
committerJunegunn Choi <junegunn.c@gmail.com>2017-09-05 13:29:46 +0900
commit446e04469df8ff3e49c18fe49722cac77e35d1a5 (patch)
tree4ce9035fc592ddfb4ae736bf2da8722d47f23564
parent5097e563df9c066e307b7923283cf1609ede693e (diff)
[neovim] use batchfile for s:execute_term in Windows
-rw-r--r--plugin/fzf.vim9
1 files changed, 8 insertions, 1 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index 15b2f6d4..6b16b10e 100644
--- a/plugin/fzf.vim
+++ b/plugin/fzf.vim
@@ -685,7 +685,14 @@ function! s:execute_term(dict, command, temps) abort
if s:present(a:dict, 'dir')
execute 'lcd' s:escape(a:dict.dir)
endif
- call termopen(a:command.s:term_marker, fzf)
+ if s:is_win
+ let fzf.temps.batchfile = s:fzf_tempname().'.bat'
+ call writefile(s:wrap_cmds(a:command), fzf.temps.batchfile)
+ let command = fzf.temps.batchfile
+ else
+ let command = a:command
+ endif
+ call termopen(command.s:term_marker, fzf)
finally
if s:present(a:dict, 'dir')
lcd -