motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit 33ea0aa4e7a1e4f95b30e9aa53318f4ddd0b9bf6 (tree)
parent 9bbea8a2a1e2bfda3119ab513f45a352c482e367
Author: Tim Pope <code@tpope.net>
Date:   Sat,  8 Jan 2011 16:49:48 -0500

Support submodules in :Gstatus

Diffstat:
Mplugin/fugitive.vim | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim @@ -548,7 +548,7 @@ endfunction function! s:StageDiff(bang) abort let section = getline(search('^# .*:$','bnW')) let line = getline('.') - let filename = matchstr(line,'^#\t\%([[:alpha:] ]\+: *\)\=\zs.*') + let filename = matchstr(line,'^#\t\%([[:alpha:] ]\+: *\)\=\zs.\{-\}\ze\%( (new commits)\)\=$') if filename ==# '' && section == '# Changes to be committed:' return 'Git diff --cached' elseif filename ==# '' @@ -574,7 +574,7 @@ function! s:StageToggle(lnum1,lnum2) abort if getline('.') == '# Changes to be committed:' return 'Gcommit' endif - let filename = matchstr(line,'^#\t\%([[:alpha:] ]\+: *\)\=\zs.*') + let filename = matchstr(line,'^#\t\%([[:alpha:] ]\+: *\)\=\zs.\{-\}\ze\%( (new commits)\)\=$') if filename ==# '' continue endif @@ -604,7 +604,7 @@ function! s:StageToggle(lnum1,lnum2) abort silent! edit! 1 redraw - call search('^#\t\%([[:alpha:] ]\+: *\)\=\V'.jump.'\$','W') + call search('^#\t\%([[:alpha:] ]\+: *\)\=\V'.jump.'\%( (new commits)\)\=\$','W') endif echo s:sub(s:gsub(output,'\n+','\n'),'\n$','') catch /^fugitive:/ @@ -624,7 +624,7 @@ function! s:StagePatch(lnum1,lnum2) abort elseif line == '# Changed but not updated:' return 'Git add --patch' endif - let filename = matchstr(line,'^#\t\%([[:alpha:] ]\+: *\)\=\zs.*') + let filename = matchstr(line,'^#\t\%([[:alpha:] ]\+: *\)\=\zs.\{-\}\ze\%( (new commits)\)\=$') if filename ==# '' continue endif @@ -652,7 +652,7 @@ function! s:StagePatch(lnum1,lnum2) abort silent! edit! 1 redraw - call search('^#\t\%([[:alpha:] ]\+: *\)\=\V'.first_filename.'\$','W') + call search('^#\t\%([[:alpha:] ]\+: *\)\=\V'.first_filename.'\%( (new commits)\)\=\$','W') endif catch /^fugitive:/ return 'echoerr v:errmsg' @@ -1631,7 +1631,7 @@ function! s:GF(mode) abort let file = '/'.matchstr(getline('.'),' -> \zs.*') return s:Edit(a:mode,file) elseif getline('.') =~# '^#\t[[:alpha:] ]\+: *.' - let file = '/'.matchstr(getline('.'),': *\zs.*') + let file = '/'.matchstr(getline('.'),': *\zs.\{-\}\ze\%( (new commits)\)\=$') return s:Edit(a:mode,file) elseif getline('.') =~# '^#\t.' let file = '/'.matchstr(getline('.'),'#\t\zs.*')