Support angle quotes in git status

Closes #228.
This commit is contained in:
Tim Pope 2013-06-05 21:35:15 -04:00
parent 3b5f715262
commit f096152a48

View File

@ -717,11 +717,11 @@ function! s:stage_info(lnum) abort
endwhile
if !lnum
return ['', '']
elseif getline(lnum+1) =~# '^# .*"git \%(reset\|rm --cached\) ' || getline(lnum) ==# '# Changes to be committed:'
elseif getline(lnum+1) =~# '^# .*\<git \%(reset\|rm --cached\) ' || getline(lnum) ==# '# Changes to be committed:'
return [matchstr(filename, colon.' *\zs.*'), 'staged']
elseif getline(lnum+2) =~# '^# .*"git checkout ' || getline(lnum) ==# '# Changes not staged for commit:'
elseif getline(lnum+2) =~# '^# .*\<git checkout ' || getline(lnum) ==# '# Changes not staged for commit:'
return [matchstr(filename, colon.' *\zs.*'), 'unstaged']
elseif getline(lnum+1) =~# '^# .*"git add/rm ' || getline(lnum) ==# '# Unmerged paths:'
elseif getline(lnum+1) =~# '^# .*\<git add/rm ' || getline(lnum) ==# '# Unmerged paths:'
return [matchstr(filename, colon.' *\zs.*'), 'unmerged']
else
return [filename, 'untracked']