Skip to content

Commit

Permalink
[neovim] Fix lcd when fzf job exits on Windows
Browse files Browse the repository at this point in the history
Related: junegunn#960 (relative filepaths)
  • Loading branch information
janlazo committed Jul 9, 2017
1 parent 68bd410 commit d27ec6d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions plugin/fzf.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d27ec6d

Please sign in to comment.