motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit 09cdce7add258f8f6d1c9d9973f9978e5b4a9ccd (tree)
parent 8851b8fe643517af160f59dfc3d88a0c4eed1fa5
Author: Tim Pope <code@tpope.net>
Date:   Wed, 23 Dec 2015 21:27:43 -0500

Fix jump to file for tree at root of commit

Closes https://github.com/tpope/vim-fugitive/issues/735

Diffstat:
Mplugin/fugitive.vim | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim @@ -1408,7 +1408,9 @@ function! s:Edit(cmd,bang,...) abort catch /^fugitive:/ return 'echoerr v:errmsg' endtry - let file = s:sub(file, '/$', '') + 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