Remove dead code

This commit is contained in:
Tim Pope
2020-01-20 08:41:19 -05:00
parent 5bcb42164e
commit bc0b78ee84

View File

@@ -4096,11 +4096,7 @@ function! s:GrepSubcommand(line1, line2, range, bang, mods, args) abort
call add(cmd, '--column') call add(cmd, '--column')
endif endif
let tree = s:Tree(dir) let tree = s:Tree(dir)
if type(a:args) == type([]) let args = a:args
let [args, after] = [a:args, '']
else
let [args, after] = s:SplitExpandChain(a:args, tree)
endif
let prefix = FugitiveVimPath(s:HasOpt(args, '--cached') || empty(tree) ? 'fugitive://' . dir . '//0/' : tree . '/') let prefix = FugitiveVimPath(s:HasOpt(args, '--cached') || empty(tree) ? 'fugitive://' . dir . '//0/' : tree . '/')
let name_only = s:HasOpt(args, '-l', '--files-with-matches', '--name-only', '-L', '--files-without-match') let name_only = s:HasOpt(args, '-l', '--files-with-matches', '--name-only', '-L', '--files-without-match')
let title = [listnr < 0 ? ':Ggrep' : ':Glgrep'] + args let title = [listnr < 0 ? ':Ggrep' : ':Glgrep'] + args
@@ -4123,9 +4119,9 @@ function! s:GrepSubcommand(line1, line2, range, bang, mods, args) abort
redraw redraw
endif endif
if !a:bang && !empty(list) if !a:bang && !empty(list)
return (listnr < 0 ? 'c' : 'l').'first' . after return (listnr < 0 ? 'c' : 'l').'first'
else else
return after[1:-1] return ''
endif endif
endfunction endfunction