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 48daf7ae7247a6cc268ebe71564e4734eb4bfc0b (tree)
parent b18bb05b91ff4f568aab91960d4dbdc502fee532
Author: Tim Pope <code@tpope.net>
Date:   Sat,  7 Apr 2012 15:42:09 -0400

Include leading / in buffer().rev()

Slowly pave the way for relative paths.

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

diff --git 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