diff --git a/autoload/SpaceVim/plugins/flygrep.vim b/autoload/SpaceVim/plugins/flygrep.vim index eedac9048..4cd0d1ba3 100644 --- a/autoload/SpaceVim/plugins/flygrep.vim +++ b/autoload/SpaceVim/plugins/flygrep.vim @@ -281,11 +281,11 @@ function! s:flygrep_result_to_files() abort let linenr = matchstr(line, ':\d\+:')[1:-2] " if the search command is grep, the searching result is " helloworld.vim:12: echo 'hello' - " echo matchstr("helloworld.vim:12: echo 'hello'", '\(:\d\+:\)\@<=.*') + " echo matchstr("helloworld.vim:12: echo 'hello'", '\(:\d\+\)\+:\zs.*') " ` echo 'hello'` - " echo matchstr("helloworld.vim:1:12: echo 'hello'", '\(:\d\+:\)\@<=.*') + " echo matchstr("helloworld.vim:1:12: echo 'hello'", '\(:\d\+\)\+:\zs.*') " ` echo 'hello'` - let str = matchstr(line, '\(:\d\+:\)\@<=.*') + let str = matchstr(line, '\(:\d\+\)\+:\zs.*') call add(files, [filename, linenr, str]) endfor return files