diff --git a/autoload/SpaceVim/plugins/flygrep.vim b/autoload/SpaceVim/plugins/flygrep.vim index 73443e992..54fc0cabd 100644 --- a/autoload/SpaceVim/plugins/flygrep.vim +++ b/autoload/SpaceVim/plugins/flygrep.vim @@ -10,7 +10,7 @@ let s:MPT._prompt.mpt = '➭ ' " files: files for grep, @buffers means listed buffer. " dir: specific a directory for grep function! SpaceVim#plugins#flygrep#open(agrv) abort - rightbelow split __flygrep__ + noautocmd rightbelow split __flygrep__ setlocal buftype=nofile bufhidden=wipe nobuflisted nolist noswapfile nowrap cursorline nospell nonu norelativenumber let save_tve = &t_ve setlocal t_ve= @@ -224,9 +224,10 @@ function! s:open_item() abort let line = getline('.') let filename = fnameescape(split(line, ':\d\+:')[0]) let linenr = matchstr(line, ':\d\+:')[1:-2] - q + let colum = matchstr(line, '\(:\d\+\)\@<=:\d\+:')[1:-2] + noautocmd q exe 'e ' . filename - exe linenr + call cursor(linenr, colum) redraw! endif endfunction diff --git a/syntax/SpaceVimFlyGrep.vim b/syntax/SpaceVimFlyGrep.vim index ba7f9bf1d..1a602c8a0 100644 --- a/syntax/SpaceVimFlyGrep.vim +++ b/syntax/SpaceVimFlyGrep.vim @@ -5,4 +5,4 @@ let b:current_syntax = "SpaceVimFlyGrep" syntax case ignore hi def link FileName Comment -call matchadd('FileName', '[^:]*:\d\+:', 2) +call matchadd('FileName', '[^:]*:\d\+:\d\+:', 2)