From c640ee78a8aa007ad8e7080c21d428e893652903 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Tue, 2 May 2017 19:34:47 -0400 Subject: [PATCH] This time I actually tried it --- plugin/fugitive.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 3dfad43..8eb90c6 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -2957,9 +2957,9 @@ function! s:cfile() abort let prefixes.a = myhash.'^:' let prefixes.b = myhash.':' endif - let ref = s:sub(ref, '^(\w)/', '\=get(prefixes, submatch(1), "HEAD:")') + let ref = substitute(ref, '^\(\w\)/', '\=get(prefixes, submatch(1), "HEAD:")', '') if exists('dref') - let dref = s:sub(dref, '^(\w)/', '\=get(prefixes, submatch(1), "HEAD:")') + let dref = substitute(dref, '^\(\w\)/', '\=get(prefixes, submatch(1), "HEAD:")', '') endif if ref ==# '/dev/null'