mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 22:20:06 +08:00
fix(flygrep): fix replace mode of flygrep
This commit is contained in:
parent
b2d1d74606
commit
63c2bbf5af
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user