Skip to content
Snippets Groups Projects
Commit 940214a1 authored by Jan Edmund Lazo's avatar Jan Edmund Lazo Committed by Junegunn Choi
Browse files

[neovim] Fix lcd when fzf job exits on Windows (#970)

Related: #960 (relative filepaths)
parent 68bd4101
No related branches found
No related tags found
No related merge requests found
......@@ -529,12 +529,15 @@ function! s:execute(dict, command, use_height, temps) abort
let command = batchfile
let a:temps.batchfile = batchfile
if has('nvim')
let s:dict = a:dict
let s:temps = a:temps
let fzf = {}
let fzf.dict = a:dict
let fzf.temps = a:temps
function! fzf.on_exit(job_id, exit_status, event) dict
let lines = s:collect(s:temps)
call s:callback(s:dict, lines)
if s:present(self.dict, 'dir')
execute 'lcd' s:escape(self.dict.dir)
endif
let lines = s:collect(self.temps)
call s:callback(self.dict, lines)
endfunction
let cmd = 'start /wait cmd /c '.command
call jobstart(cmd, fzf)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment