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 d488a7090fddc05152ee9e493837bf03d937dbf4 (tree)
parent 2a53d7924877b38b3d82fba188fd9053bfbc646e
Author: Tim Pope <code@tpope.net>
Date:   Fri,  3 Sep 2021 11:12:34 -0400

Add >/ and >:/ as work-tree version expansions

Not sure I want to waste the easy to type ">" on the work tree version,
so adding some alternatives.

Diffstat:
Mautoload/fugitive.vim | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim @@ -1868,7 +1868,7 @@ endfunction function! s:Expand(rev, ...) abort if a:rev =~# '^>\=:[0-3]$' let file = len(expand('%')) ? a:rev[-2:-1] . ':%' : '%' - elseif a:rev ==# '>' + elseif a:rev =~# '^>\%(:\=/\)\=$' let file = '%' elseif a:rev ==# '>:' let file = empty(s:DirCommitFile(@%)[0]) ? ':0:%' : '%'