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 70a36ceef89933ac7a2800b236ccb4bf19f111ed (tree)
parent f71079db4d83bd0ebd0bc79a357fae2127966045
Author: Tim Pope <code@tpope.net>
Date:   Mon, 25 Jun 2018 15:22:29 -0400

Alias buffer.path() as buffer.blob()

Blob isn't a great name, but it's less ambiguous.

Diffstat:
Mautoload/fugitive.vim | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim @@ -538,7 +538,7 @@ function! s:cpath(path) abort endif endfunction -function! s:buffer_path(...) dict abort +function! s:buffer_blob(...) dict abort let rev = matchstr(self.spec(),'^fugitive:\%(//\)\=.\{-\}\%(//\|::\)\zs.*') if rev != '' let rev = s:sub(rev,'\w*','') @@ -630,7 +630,8 @@ function! s:buffer_up(...) dict abort return rev endfunction -call s:add_methods('buffer',['getvar','setvar','getline','repo','type','spec','name','commit','path','rev','sha1','expand','containing_commit','up']) +call s:add_methods('buffer',['getvar','setvar','getline','repo','type','spec','name','commit','blob','rev','sha1','expand','containing_commit','up']) +let s:buffer_prototype.path = s:function('s:buffer_blob') " Section: Git