From 26433842e9423ca01ca988096675c932557d565e Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sun, 27 May 2018 15:21:05 -0400 Subject: [PATCH] Revert accidentally committed changes This partially reverts commit 65be0ae749396697065fff2cbdb97f14c42242fc. --- plugin/fugitive.vim | 66 ++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 765b8c8..1561470 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -93,7 +93,7 @@ endfunction function! s:recall() abort let rev = s:sub(s:buffer().rev(), '^/', '') if rev ==# ':' - return matchstr(getline('.'),'^.\=\t\%([[:alpha:] ]\+: *\)\=\zs.\{-\}\ze\%( ([^()[:digit:]]\+)\)\=$\|^\d\{6} \x\{40\} \d\t\zs.*') + return matchstr(getline('.'),'^#\t\%([[:alpha:] ]\+: *\)\=\zs.\{-\}\ze\%( ([^()[:digit:]]\+)\)\=$\|^\d\{6} \x\{40\} \d\t\zs.*') elseif s:buffer().type('tree') let file = matchstr(getline('.'), '\t\zs.*') if empty(file) && line('.') > 2 @@ -867,7 +867,7 @@ function! fugitive#ReloadStatus() abort endfunction function! s:stage_info(lnum) abort - let filename = matchstr(getline(a:lnum),'^.\=\t\zs.\{-\}\ze\%( ([^()[:digit:]]\+)\)\=$') + let filename = matchstr(getline(a:lnum),'^#\t\zs.\{-\}\ze\%( ([^()[:digit:]]\+)\)\=$') let lnum = a:lnum if has('multi_byte_encoding') let colon = '\%(:\|\%uff1a\)' @@ -879,13 +879,13 @@ function! s:stage_info(lnum) abort endwhile if !lnum return ['', ''] - elseif (getline(lnum+1) =~# '^.\= .*\ ')[1]] elseif section ==# 'staged' let reset += [filename] - elseif getline(lnum) !~# '^.\=\tdeleted:' + elseif getline(lnum) !~# '^#\tdeleted:' let add += [filename] endif endfor @@ -1094,7 +1094,7 @@ function! s:StagePatch(lnum1,lnum2) abort silent! edit! 1 redraw - call search('^.\=\t\%([[:alpha:] ]\+: *\)\=\V'.first_filename.'\%( ([^()[:digit:]]\+)\)\=\$','W') + call search('^#\t\%([[:alpha:] ]\+: *\)\=\V'.first_filename.'\%( ([^()[:digit:]]\+)\)\=\$','W') endif catch /^fugitive:/ return 'echoerr v:errmsg' @@ -2931,25 +2931,25 @@ function! s:cfile() abort let file = ':'.s:sub(matchstr(getline('.'),'\d\t.*'),'\t',':') return [file] - elseif getline('.') =~# '^.\=\trenamed:.* -> ' + elseif getline('.') =~# '^#\trenamed:.* -> ' let file = '/'.matchstr(getline('.'),' -> \zs.*') return [file] - elseif getline('.') =~# '^.\=\t\(\k\| \)\+\p\?: *.' + elseif getline('.') =~# '^#\t\(\k\| \)\+\p\?: *.' let file = '/'.matchstr(getline('.'),': *\zs.\{-\}\ze\%( ([^()[:digit:]]\+)\)\=$') return [file] - elseif getline('.') =~# '^.\=\t.' - let file = '/'.matchstr(getline('.'),'\t\zs.*') + elseif getline('.') =~# '^#\t.' + let file = '/'.matchstr(getline('.'),'#\t\zs.*') return [file] elseif getline('.') =~# ': needs merge$' let file = '/'.matchstr(getline('.'),'.*\ze: needs merge$') return [file, 'Gdiff!'] - elseif getline('.') =~# '^\%(. \)\=Not currently on any branch.$' + elseif getline('.') ==# '# Not currently on any branch.' return ['HEAD'] - elseif getline('.') =~# '^\%(. \)\=On branch ' + elseif getline('.') =~# '^# On branch ' let file = 'refs/heads/'.getline('.')[12:] return [file] - elseif getline('.') =~# "^\\%(. \\)\=Your branch .*'" + elseif getline('.') =~# "^# Your branch .*'" let file = matchstr(getline('.'),"'\\zs\\S\\+\\ze'") return [file] endif