Remove error guards for old object syntax
This commit is contained in:
parent
881ad1ed0b
commit
3e9ef9349d
@ -1006,15 +1006,9 @@ function! s:ExpandVar(other, var, flags, esc, ...) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:Expand(rev, ...) abort
|
function! s:Expand(rev, ...) abort
|
||||||
if a:rev =~# '^:0$'
|
if a:rev =~# '^:[0-3]$'
|
||||||
call s:throw('Use ' . string(':%') . ' instead of ' . string(a:rev))
|
let file = a:rev . ':%'
|
||||||
elseif a:rev =~# '^:[1-3]$'
|
elseif a:rev =~# '^>[~^]\|^>@{\|^>$'
|
||||||
call s:throw('Use ' . string(a:rev . ':%') . ' instead of ' . string(a:rev))
|
|
||||||
elseif a:rev =~# '^@{' || a:rev =~# '^\^[0-9~^{]\|^\~[0-9~^]\|^\^$'
|
|
||||||
call s:throw('Use ' . string('!' . a:rev . ':%') . ' instead of ' . string(a:rev))
|
|
||||||
elseif a:rev =~# '^-'
|
|
||||||
call s:throw('Use ' . string('!' . a:rev[1:-1] . ':%') . ' instead of ' . string(a:rev))
|
|
||||||
elseif a:rev =~# '^>[~^]\|^>@{\|^>:\d$'
|
|
||||||
let file = 'HEAD' . a:rev[1:-1] . ':%'
|
let file = 'HEAD' . a:rev[1:-1] . ':%'
|
||||||
elseif a:rev =~# '^>[> ]\@!'
|
elseif a:rev =~# '^>[> ]\@!'
|
||||||
let file = a:rev[1:-1] . ':%'
|
let file = a:rev[1:-1] . ':%'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user