diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 9677f6b..86505e5 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -645,7 +645,7 @@ function! fugitive#Route(object, ...) abort endif endif if !exists('f') - let commit = substitute(matchstr(rev, '^[^:]\+\|^:.*'), '^@\%($|[^~]\)\@=', 'HEAD', '') + let commit = substitute(matchstr(rev, '^[^:]\+\|^:.*'), '^@\%($\|[~^]\|@{\)\@=', 'HEAD', '') let file = substitute(matchstr(rev, '^[^:]\+\zs:.*'), '^:', '/', '') if file =~# '^/\.\.\=\%(/\|$\)\|^//\|^/\a\+:' let file = file =~# '^/\.' ? simplify(getcwd() . file) : file[1:-1]