mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-12 21:33:53 -05:00
Avoid false positive matches of status files in non-status buffers
This commit is contained in:
@@ -3078,8 +3078,8 @@ function! s:cfile() abort
|
||||
let ref = matchstr(getline('.'),'\x\{40\}')
|
||||
let file = ':'.s:sub(matchstr(getline('.'),'\d\t.*'),'\t',':')
|
||||
return [file]
|
||||
|
||||
elseif getline('.') =~# '^.\=\trenamed:.* -> '
|
||||
elseif &filetype ==# 'gitcommit'
|
||||
if getline('.') =~# '^.\=\trenamed:.* -> '
|
||||
let file = '/'.matchstr(getline('.'),' -> \zs.*')
|
||||
return [file]
|
||||
elseif getline('.') =~# '^.\=\t\(\k\| \)\+\p\?: *.'
|
||||
@@ -3101,6 +3101,7 @@ function! s:cfile() abort
|
||||
let file = matchstr(getline('.'),"'\\zs\\S\\+\\ze'")
|
||||
return [file]
|
||||
endif
|
||||
endif
|
||||
|
||||
let showtree = (getline(1) =~# '^tree ' && getline(2) == "")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user