Remove toggling behavior of :Gblame

References https://github.com/tpope/vim-fugitive/issues/1316
This commit is contained in:
Tim Pope
2019-08-22 19:14:59 -05:00
parent f04a2275db
commit 3a01f4b819

View File

@@ -4775,13 +4775,11 @@ function! s:BlameSubcommand(line1, count, range, bang, mods, args) abort
endif endif
let i += 1 let i += 1
endwhile endwhile
if empty(ranges + commits + files) && has_key(s:TempState(), 'blame_flags')
return substitute(s:BlameLeave(), '^$', 'bdelete', '')
endif
let file = substitute(get(files, 0, get(s:TempState(), 'blame_file', s:Relative('./'))), '^\.\%(/\|$\)', '', '') let file = substitute(get(files, 0, get(s:TempState(), 'blame_file', s:Relative('./'))), '^\.\%(/\|$\)', '', '')
if empty(commits) && len(files) > 1 if empty(commits) && len(files) > 1
call add(commits, remove(files, 1)) call add(commits, remove(files, 1))
endif endif
exe s:BlameLeave()
try try
let cmd = ['--no-pager', '-c', 'blame.coloring=none', '-c', 'blame.blankBoundary=false', 'blame', '--show-number'] let cmd = ['--no-pager', '-c', 'blame.coloring=none', '-c', 'blame.blankBoundary=false', 'blame', '--show-number']
call extend(cmd, filter(copy(flags), 'v:val !~# "\\v^%(-b|--%(no-)=color-.*|--progress)$"')) call extend(cmd, filter(copy(flags), 'v:val !~# "\\v^%(-b|--%(no-)=color-.*|--progress)$"'))