mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-14 14:23:51 -05:00
Support jump to diff from :Git log --name-status
Resolves: https://github.com/tpope/vim-fugitive/issues/1838
This commit is contained in:
@@ -7661,6 +7661,15 @@ function! s:cfile() abort
|
|||||||
let ref = matchstr(getline('.'),'\x\{40,\}')
|
let ref = matchstr(getline('.'),'\x\{40,\}')
|
||||||
echoerr "warning: unknown context ".matchstr(getline('.'),'^\l*')
|
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]\=/'
|
elseif getline('.') =~# '^[+-]\{3\} [abciow12]\=/'
|
||||||
let ref = getline('.')[4:]
|
let ref = getline('.')[4:]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user