diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim
index c581ebc..b24ac4b 100644
--- a/plugin/fugitive.vim
+++ b/plugin/fugitive.vim
@@ -1,6 +1,6 @@
" fugitive.vim - A Git wrapper so awesome, it should be illegal
" Maintainer: Tim Pope
-" Version: 2.3
+" Version: 2.2
" GetLatestVimScripts: 2975 1 :AutoInstall: fugitive.vim
if exists('g:loaded_fugitive') || &cp
@@ -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