mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-02 23:00:04 +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:
parent
4f39f053d6
commit
ffa86f2cd9
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user