Fix jump to file for tree at root of commit

Closes https://github.com/tpope/vim-fugitive/issues/735
This commit is contained in:
Tim Pope
2015-12-23 21:27:43 -05:00
parent 8851b8fe64
commit 09cdce7add

View File

@@ -1408,7 +1408,9 @@ function! s:Edit(cmd,bang,...) abort
catch /^fugitive:/
return 'echoerr v:errmsg'
endtry
if file !~# '^fugitive:'
let file = s:sub(file, '/$', '')
endif
if a:cmd ==# 'read'
return 'silent %delete_|read '.s:fnameescape(file).'|silent 1delete_|diffupdate|'.line('.')
else