From 48daf7ae7247a6cc268ebe71564e4734eb4bfc0b Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sat, 7 Apr 2012 15:42:09 -0400 Subject: [PATCH] Include leading / in buffer().rev() Slowly pave the way for relative paths. --- plugin/fugitive.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 47cc94b..1c05877 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -65,7 +65,7 @@ function! s:shellslash(path) endfunction function! s:recall() - let rev = s:buffer().rev() + let rev = s:sub(s:buffer().rev(), '^/', '') if rev ==# ':' return matchstr(getline('.'),'^#\t\%([[:alpha:] ]\+: *\)\=\zs.\{-\}\ze\%( (new commits)\)\=$\|^\d\{6} \x\{40\} \d\t\zs.*') endif @@ -497,7 +497,7 @@ function! s:buffer_rev() dict abort elseif self.spec() =~ '\.git/refs/\|\.git/.*HEAD$' return self.spec()[strlen(self.repo().dir())+1 : -1] else - return self.path() + return self.path('/') endif endfunction