Support jump to diff from :Git log --name-status

Resolves: https://github.com/tpope/vim-fugitive/issues/1838
This commit is contained in:
Tim Pope
2021-09-14 18:18:49 -04:00
parent 79a6a1941d
commit 67c4c031fa

View File

@@ -7661,6 +7661,15 @@ function! s:cfile() abort
let ref = matchstr(getline('.'),'\x\{40,\}')
echoerr "warning: unknown context ".matchstr(getline('.'),'^\l*')
elseif getline('.') =~# '^[A-Z]\d*\t\S' && len(myhash)
let files = split(getline('.'), "\t")[1:-1]
let ref = 'b/' . files[-1]
if getline('.') =~# '^D'
let ref = 'a/' . files[0]
elseif getline('.') !~# '^A'
let dcmds = ['', 'Gdiffsplit! >' . myhash . '^:' . fnameescape(files[0])]
endif
elseif getline('.') =~# '^[+-]\{3\} [abciow12]\=/'
let ref = getline('.')[4:]