From 385c0fb4ee2eafaee21dccc56cb1a8ec04a0c1a9 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sat, 28 Aug 2021 05:29:19 -0400 Subject: [PATCH] Use not for temp file "." map Also, skip over that "+" that marks work-tree branches in :Git branch output. --- autoload/fugitive.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index cd36a39..9f8b2a4 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -2949,7 +2949,11 @@ endfunction function! s:TempDotMap() abort let cfile = s:cfile() if empty(cfile) - return expand('') + if getline('.') =~# '^[*+] \+\f' && col('.') < 2 + return matchstr(getline('.'), '^. \+\zs\f\+') + else + return expand('') + endif endif let name = fugitive#Find(cfile[0]) let [dir, commit, file] = s:DirCommitFile(name)