Fix tab Gdiffsplit opening empty buffer

This commit is contained in:
Kevin Hwang
2024-11-20 01:16:44 +08:00
committed by GitHub
parent d4877e54ce
commit 320b18fba2

View File

@@ -6627,7 +6627,7 @@ function! fugitive#Diffsplit(autodir, keepfocus, mods, arg, ...) abort
let commit = s:DirCommitFile(@%)[1] let commit = s:DirCommitFile(@%)[1]
if a:mods =~# '\<\d*tab\>' if a:mods =~# '\<\d*tab\>'
let mods = substitute(a:mods, '\<\d*tab\>', '', 'g') let mods = substitute(a:mods, '\<\d*tab\>', '', 'g')
let pre = matchstr(a:mods, '\<\d*tab\>') . 'edit' let pre = matchstr(a:mods, '\<\d*tab\>') . ' split'
else else
let mods = 'keepalt ' . a:mods let mods = 'keepalt ' . a:mods
let pre = '' let pre = ''