Skip to content
This repository
Browse code

Support advice.statusHints = false

Closes #230.
  • Loading branch information...
commit 0abe1fb12232abe5b7bdfa4d244f04faf3450ba3 1 parent a90cc48
Tim Pope authored

Showing 1 changed file with 5 additions and 5 deletions. Show diff stats Hide diff stats

  1. +5 5 plugin/fugitive.vim
10 plugin/fugitive.vim
@@ -687,9 +687,9 @@ function! s:stage_info(lnum) abort
687 687 endwhile
688 688 if !lnum
689 689 return ['', '']
690   - elseif getline(lnum+1) =~# '^#.*"git \%(reset\|rm --cached\) '
  690 + elseif getline(lnum+1) =~# '^# .*"git \%(reset\|rm --cached\) ' || getline(lnum) ==# '# Changes to be committed:'
691 691 return [matchstr(filename, ': *\zs.*'), 'staged']
692   - elseif getline(lnum+2) =~# '^#.*"git checkout '
  692 + elseif getline(lnum+2) =~# '^# .*"git checkout ' || getline(lnum) ==# '# Changes not staged for commit:'
693 693 return [matchstr(filename, ': *\zs.*'), 'unstaged']
694 694 else
695 695 return [filename, 'untracked']
@@ -738,7 +738,7 @@ function! s:StageDiffEdit() abort
738 738 if arg ==# '.'
739 739 silent! edit!
740 740 1
741   - if !search('^# .*:\n#.*\n#.*"git checkout ','W')
  741 + if !search('^# .*:\n#.*\n# .*"git checkout \|^# Changes not staged for commit:$','W')
742 742 call search('^# .*:$','W')
743 743 endif
744 744 else
@@ -761,7 +761,7 @@ function! s:StageToggle(lnum1,lnum2) abort
761 761 call repo.git_chomp_in_tree('reset','-q')
762 762 silent! edit!
763 763 1
764   - if !search('^# .*:\n#.*"git add .*\n#\n','W')
  764 + if !search('^# .*:\n# .*"git add .*\n#\n\|^# Untracked files:$','W')
765 765 call search('^# .*:$','W')
766 766 endif
767 767 return ''
@@ -769,7 +769,7 @@ function! s:StageToggle(lnum1,lnum2) abort
769 769 call repo.git_chomp_in_tree('add','-u')
770 770 silent! edit!
771 771 1
772   - if !search('^# .*:\n#.*"git add .*\n#\n','W')
  772 + if !search('^# .*:\n# .*"git add .*\n#\n\|^# Untracked files:$','W')
773 773 call search('^# .*:$','W')
774 774 endif
775 775 return ''

0 comments on commit 0abe1fb

Please sign in to comment.
Something went wrong with that request. Please try again.