Fix false positive on deprecated :.Glog usage

This commit is contained in:
Tim Pope
2020-02-05 11:57:50 -05:00
parent a95972cefc
commit 3c45ed0d13

View File

@@ -4193,7 +4193,7 @@ function! fugitive#LogCommand(line1, count, range, bang, mods, args, type) abort
\ args + extra_args + paths + extra_paths)
let state.target = path
let title = titlepre . (listnr < 0 ? 'Gclog ' : 'Gllog ') . s:fnameescape(args + paths)
if empty(paths + extra_paths) && empty(a:type) && len(s:Relative('/'))
if empty(paths + extra_paths) && empty(a:type) && a:count < 0 && len(s:Relative('/'))
let after = '|echohl WarningMsg|echo ' . string('Use :0Glog or :0Gclog for old behavior of targeting current file') . '|echohl NONE' . after
endif
return s:QuickfixStream(listnr, 'log', title, s:UserCommandList(dir) + cmd, !a:bang, s:function('s:LogParse'), state, dir) . after