1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 02:00:05 +08:00

Fix bug: can't open files with space in names

close https://github.com/wsdjeg/FlyGrep.vim/issues/3
This commit is contained in:
wsdjeg 2017-07-25 07:33:31 +08:00
parent 4f39f053d6
commit ffa86f2cd9

View File

@ -126,22 +126,18 @@ function! s:previous_item() abort
endfunction
function! s:open_item() abort
if line('.') !=# ''
if getline('.') !=# ''
if s:grepid != 0
call s:JOB.stop(s:grepid)
endif
call s:MPT._clear_prompt()
let s:MPT._quit = 1
let isfname = &isfname
if s:SYS.isWindows
set isfname-=:
endif
normal! gF
let nr = bufnr('%')
let line = getline('.')
let filename = fnameescape(split(line, ':\d\+:')[0])
let linenr = matchstr(line, ':\d\+:')[1:-2]
q
exe 'silent b' . nr
normal! :
let &isfname = isfname
exe 'e ' . filename
exe linenr
endif
endfunction