From 12e43b62cc0bc67f83f6a425b5f1a818b4281e79 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Thu, 5 Mar 2020 13:20:33 -0500 Subject: [PATCH] Don't use "Head:" header for commit under cursor This is the first line of the file so it's an annoyingly aggressive default. --- autoload/fugitive.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index be72fed..0dacf28 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -5824,7 +5824,7 @@ endfunction " Section: Go to file -let s:ref_header = '\%(Head\|Merge\|Rebase\|Upstream\|Pull\|Push\)' +let s:ref_header = '\%(Merge\|Rebase\|Upstream\|Pull\|Push\)' nnoremap : :=v:count ? v:count : '' function! fugitive#MapCfile(...) abort @@ -6040,7 +6040,7 @@ function! s:StatusCfile(...) abort return [lead . info.relative[0]] elseif len(info.commit) return [info.commit] - elseif line =~# '^' . s:ref_header . ': ' + elseif line =~# '^' . s:ref_header . ': \|^Head: ' return [matchstr(line, ' \zs.*')] else return ['']