Tweak version conditional statements

This commit is contained in:
Kien N 2012-02-27 19:45:37 +07:00
parent 0e34ecefd2
commit 247bd4835e
2 changed files with 4 additions and 4 deletions

View File

@ -869,7 +869,7 @@ fu! s:OpenMulti()
cal s:sanstail(join(s:prompt, '')) cal s:sanstail(join(s:prompt, ''))
cal s:PrtExit() cal s:PrtExit()
" Move the cursor to a reusable window " Move the cursor to a reusable window
let [tail, fnesc] = [s:tail(), exists('*fnameescape') && v:version > 702] let [tail, fnesc] = [s:tail(), exists('*fnameescape') && v:version > 701]
let emptytail = empty(tail) let emptytail = empty(tail)
let useb = bufnr('^'.mkd[0].'$') > 0 && emptytail let useb = bufnr('^'.mkd[0].'$') > 0 && emptytail
let fst = call('ctrlp#normcmd', useb ? ['b', 'bo vert sb'] : ['e']) let fst = call('ctrlp#normcmd', useb ? ['b', 'bo vert sb'] : ['e'])
@ -1369,8 +1369,8 @@ fu! s:getenv()
let s:wpmode = exists('b:ctrlp_working_path_mode') let s:wpmode = exists('b:ctrlp_working_path_mode')
\ ? b:ctrlp_working_path_mode : s:pathmode \ ? b:ctrlp_working_path_mode : s:pathmode
if exists('g:ctrlp_extensions') if exists('g:ctrlp_extensions')
if index(g:ctrlp_extensions, 'undo') >= 0 if index(g:ctrlp_extensions, 'undo') >= 0 && exists('*undotree')
\ && v:version > 702 && has('patch005') && exists('*undotree') \ && ( v:version > 703 || ( v:version == 703 && has('patch005') ) )
let s:undotree = undotree() let s:undotree = undotree()
en en
if index(g:ctrlp_extensions, 'tag') >= 0 if index(g:ctrlp_extensions, 'tag') >= 0

View File

@ -13,7 +13,7 @@
" Init {{{1 " Init {{{1
if ( exists('g:loaded_ctrlp_undo') && g:loaded_ctrlp_undo ) if ( exists('g:loaded_ctrlp_undo') && g:loaded_ctrlp_undo )
\ || !( v:version > 702 && has('patch005') ) \ || !( v:version > 703 || ( v:version == 703 && has('patch005') ) )
fini fini
en en
let g:loaded_ctrlp_undo = 1 let g:loaded_ctrlp_undo = 1