From e06005a742714a4293f1928bca0aca7c9e383383 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Thu, 5 Mar 2020 08:34:50 -0500 Subject: [PATCH] Fix staging hunk that comes after binary file Closes https://github.com/tpope/vim-fugitive/issues/1462 --- autoload/fugitive.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index aa2bde7..6f1d999 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -3348,6 +3348,8 @@ function! s:StageInline(mode, ...) abort endif let start = index let mode = 'head' + elseif mode ==# 'head' && line =~# '^diff ' + let start = index elseif mode ==# 'head' && substitute(line, "\t$", '', '') ==# '--- ' . info.relative[-1] let mode = 'await' elseif mode ==# 'head' && substitute(line, "\t$", '', '') ==# '+++ ' . info.relative[0]