From a71120ca8f49cca08587ec9b569d41f4235327b2 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sat, 23 Apr 2011 21:23:52 -0400 Subject: [PATCH] Cope with new "Changes not staged" heading --- plugin/fugitive.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index eb7cf41..cd1ab0d 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -640,9 +640,9 @@ function! s:StagePatch(lnum1,lnum2) abort for lnum in range(a:lnum1,a:lnum2) let line = getline(lnum) - if line == '# Changes to be committed:' + if line ==# '# Changes to be committed:' return 'Git reset --patch' - elseif line == '# Changed but not updated:' + elseif line =~# '^# Change\%(d but not updated\|s not staged for commit\):$' return 'Git add --patch' endif let filename = matchstr(line,'^#\t\%([[:alpha:] ]\+: *\)\=\zs.\{-\}\ze\%( (new commits)\)\=$')