mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-10 20:43:46 -05:00
Fix jump to file for tree at root of commit
Closes https://github.com/tpope/vim-fugitive/issues/735
This commit is contained in:
@@ -1408,7 +1408,9 @@ function! s:Edit(cmd,bang,...) abort
|
|||||||
catch /^fugitive:/
|
catch /^fugitive:/
|
||||||
return 'echoerr v:errmsg'
|
return 'echoerr v:errmsg'
|
||||||
endtry
|
endtry
|
||||||
let file = s:sub(file, '/$', '')
|
if file !~# '^fugitive:'
|
||||||
|
let file = s:sub(file, '/$', '')
|
||||||
|
endif
|
||||||
if a:cmd ==# 'read'
|
if a:cmd ==# 'read'
|
||||||
return 'silent %delete_|read '.s:fnameescape(file).'|silent 1delete_|diffupdate|'.line('.')
|
return 'silent %delete_|read '.s:fnameescape(file).'|silent 1delete_|diffupdate|'.line('.')
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user