Use correct quickfix commands for :Gllog
This commit is contained in:
parent
5c3d30223b
commit
1fb7fa0078
@ -3427,17 +3427,21 @@ function! s:Log(cmd, bang, line1, line2, ...) abort
|
|||||||
let &grepformat = '%Cdiff %.%#,%C--- %.%#,%C+++ %.%#,%Z@@ -%\d%\+\,%\d%\+ +%l\,%\d%\+ @@,%-G-%.%#,%-G+%.%#,%-G %.%#,%A%f' . "\t\t" . module . "\t\t%m,%-G%.%#"
|
let &grepformat = '%Cdiff %.%#,%C--- %.%#,%C+++ %.%#,%Z@@ -%\d%\+\,%\d%\+ +%l\,%\d%\+ @@,%-G-%.%#,%-G+%.%#,%-G %.%#,%A%f' . "\t\t" . module . "\t\t%m,%-G%.%#"
|
||||||
silent! exe a:cmd . '!' . escape(s:ShellExpand(before . after), '|')
|
silent! exe a:cmd . '!' . escape(s:ShellExpand(before . after), '|')
|
||||||
redraw!
|
redraw!
|
||||||
copen
|
|
||||||
wincmd p
|
|
||||||
if !a:bang
|
|
||||||
cfirst
|
|
||||||
endif
|
|
||||||
return ''
|
|
||||||
finally
|
finally
|
||||||
let &grepformat = grepformat
|
let &grepformat = grepformat
|
||||||
let &grepprg = grepprg
|
let &grepprg = grepprg
|
||||||
execute cdback
|
execute cdback
|
||||||
endtry
|
endtry
|
||||||
|
let winnr = winnr()
|
||||||
|
let letter = a:cmd =~# '^l' ? 'l' : 'c'
|
||||||
|
exe letter . 'open'
|
||||||
|
if winnr != winnr()
|
||||||
|
wincmd p
|
||||||
|
endif
|
||||||
|
if !a:bang && len(letter ==# 'l' ? getloclist(0) : getqflist())
|
||||||
|
return letter . 'first'
|
||||||
|
endif
|
||||||
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
call s:command("-bar -bang -nargs=? -complete=customlist,s:GrepComplete Ggrep :execute s:Grep('grep',<bang>0,<q-args>)")
|
call s:command("-bar -bang -nargs=? -complete=customlist,s:GrepComplete Ggrep :execute s:Grep('grep',<bang>0,<q-args>)")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user