diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index b484ce1..fd8034c 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -2869,7 +2869,7 @@ function! s:StageInline(mode, ...) abort endif continue endif - if !has_key(b:fugitive_diff, info.section) || info.status !~# '^[ADMR]$' || a:mode ==# 'hide' + if !has_key(b:fugitive_diff, info.section) || info.status !~# '^[ADMRU]$' || a:mode ==# 'hide' continue endif let mode = '' @@ -2980,8 +2980,10 @@ function! s:StageApply(info, reverse, extra) abort call insert(lines, getline(start)) endif endwhile - if start == 0 || getline(start) !~# '^@@ ' - call s:throw("could not find hunk") + if start == 0 + throw 'fugitive: cold not find hunk' + elseif getline(start) !~# '^@@ ' + throw 'fugitive: cannot apply conflict hunk' endif let i = b:fugitive_expanded[info.section][info.filename][0] let head = [] diff --git a/syntax/fugitive.vim b/syntax/fugitive.vim index e2389b5..f3c497b 100644 --- a/syntax/fugitive.vim +++ b/syntax/fugitive.vim @@ -22,7 +22,7 @@ syn match FugitiveSymbolicRef /\.\@!\%(\.\.\@!\|[^[:space:][:cntrl:]\:.]\)\+\.\@ syn match fugitiveHash /^\x\{4,\}\>/ contained containedin=fugitiveSection syn match fugitiveHash /\<\x\{4,\}\>/ contained -syn region fugitiveHunk start=/^\%(@@ -\)\@=/ end=/^\%([A-Za-z?@]\|$\)\@=/ contains=@fugitiveDiff containedin=fugitiveSection fold +syn region fugitiveHunk start=/^\%(@@\+ -\)\@=/ end=/^\%([A-Za-z?@]\|$\)\@=/ contains=@fugitiveDiff containedin=fugitiveSection fold hi def link fugitiveHeader Label hi def link fugitiveHeading PreProc