mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 05:43:52 -05:00
Don't use "Head:" header for commit under cursor
This is the first line of the file so it's an annoyingly aggressive default.
This commit is contained in:
@@ -5824,7 +5824,7 @@ endfunction
|
|||||||
|
|
||||||
" Section: Go to file
|
" Section: Go to file
|
||||||
|
|
||||||
let s:ref_header = '\%(Head\|Merge\|Rebase\|Upstream\|Pull\|Push\)'
|
let s:ref_header = '\%(Merge\|Rebase\|Upstream\|Pull\|Push\)'
|
||||||
|
|
||||||
nnoremap <SID>: :<C-U><C-R>=v:count ? v:count : ''<CR>
|
nnoremap <SID>: :<C-U><C-R>=v:count ? v:count : ''<CR>
|
||||||
function! fugitive#MapCfile(...) abort
|
function! fugitive#MapCfile(...) abort
|
||||||
@@ -6040,7 +6040,7 @@ function! s:StatusCfile(...) abort
|
|||||||
return [lead . info.relative[0]]
|
return [lead . info.relative[0]]
|
||||||
elseif len(info.commit)
|
elseif len(info.commit)
|
||||||
return [info.commit]
|
return [info.commit]
|
||||||
elseif line =~# '^' . s:ref_header . ': '
|
elseif line =~# '^' . s:ref_header . ': \|^Head: '
|
||||||
return [matchstr(line, ' \zs.*')]
|
return [matchstr(line, ' \zs.*')]
|
||||||
else
|
else
|
||||||
return ['']
|
return ['']
|
||||||
|
|||||||
Reference in New Issue
Block a user