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 b9525df1906dc4eb94bc26253bb2b9940cc56edc (tree)
parent 582eb0d3c90e9e6ebea994e1b8039cdae995b30f
Author: Tim Pope <code@tpope.net>
Date:   Wed,  9 Jan 2013 23:11:30 -0500

Support WIDE COLON in :Gstatus in some locales

Closes #228.

Diffstat:
Mplugin/fugitive.vim | 15++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim @@ -682,17 +682,18 @@ endfunction function! s:stage_info(lnum) abort let filename = matchstr(getline(a:lnum),'^#\t\zs.\{-\}\ze\%( ([^()[:digit:]]\+)\)\=$') let lnum = a:lnum - while lnum && getline(lnum) !~# '^#.*:$' + let colon = '\%(:\|\%uff1a\)' + while lnum && getline(lnum) !~# colon.'$' let lnum -= 1 endwhile if !lnum return ['', ''] elseif getline(lnum+1) =~# '^# .*"git \%(reset\|rm --cached\) ' || getline(lnum) ==# '# Changes to be committed:' - return [matchstr(filename, ': *\zs.*'), 'staged'] + return [matchstr(filename, colon.' *\zs.*'), 'staged'] elseif getline(lnum+2) =~# '^# .*"git checkout ' || getline(lnum) ==# '# Changes not staged for commit:' - return [matchstr(filename, ': *\zs.*'), 'unstaged'] + return [matchstr(filename, colon.' *\zs.*'), 'unstaged'] elseif getline(lnum+1) =~# '^# .*"git add/rm ' || getline(lnum) ==# '# Unmerged paths:' - return [matchstr(filename, ': *\zs.*'), 'unmerged'] + return [matchstr(filename, colon.' *\zs.*'), 'unmerged'] else return [filename, 'untracked'] endif @@ -718,14 +719,14 @@ endfunction function! s:StageReloadSeek(target,lnum1,lnum2) let jump = a:target - let f = matchstr(getline(a:lnum1-1),'^#\t\%([[:alpha:] ]\+: *\)\=\zs.*') + let f = matchstr(getline(a:lnum1-1),'^#\t\%([[:alpha:] ]\+: *\|.*\%uff1a *\)\=\zs.*') if f !=# '' | let jump = f | endif - let f = matchstr(getline(a:lnum2+1),'^#\t\%([[:alpha:] ]\+: *\)\=\zs.*') + let f = matchstr(getline(a:lnum2+1),'^#\t\%([[:alpha:] ]\+: *\|.*\%uff1a *\)\=\zs.*') if f !=# '' | let jump = f | endif silent! edit! 1 redraw - call search('^#\t\%([[:alpha:] ]\+: *\)\=\V'.jump.'\%( ([^()[:digit:]]\+)\)\=\$','W') + call search('^#\t\%([[:alpha:] ]\+: *\|.*\%uff1a *\)\=\V'.jump.'\%( ([^()[:digit:]]\+)\)\=\$','W') endfunction function! s:StageDiff(diff) abort