From 4a5781bc1b17b320380712ac3cceffc81e7555b9 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sun, 22 Jul 2018 01:57:39 -0400 Subject: [PATCH] Fix issue generating Fugitive URLs --- autoload/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index d46ea9b..c4bc212 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -343,7 +343,7 @@ function! s:repo_translate(spec, ...) dict abort endif if !exists('f') let commit = substitute(matchstr(rev,'^[^:]\+\|^:.*'), '^@\%($|[^~]\)\@=', 'HEAD', '') - let file = substitute(matchstr(rev, '^[^:]\+:.*'), '^:', '/', '') + let file = substitute(matchstr(rev, '^[^:]\+\zs:.*'), '^:', '/', '') if commit !~# '^[0-9a-f]\{40\}$' let commit = system(fugitive#Prepare(dir, 'rev-parse', '--verify', commit))[0:-2] let commit = v:shell_error ? '' : commit