From 247bd4835e7bbc058f248bf350dfedded321d76a Mon Sep 17 00:00:00 2001 From: Kien N Date: Mon, 27 Feb 2012 19:45:37 +0700 Subject: [PATCH] Tweak version conditional statements --- autoload/ctrlp.vim | 6 +++--- autoload/ctrlp/undo.vim | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/autoload/ctrlp.vim b/autoload/ctrlp.vim index 800aa11..eb5c45d 100644 --- a/autoload/ctrlp.vim +++ b/autoload/ctrlp.vim @@ -869,7 +869,7 @@ fu! s:OpenMulti() cal s:sanstail(join(s:prompt, '')) cal s:PrtExit() " 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 useb = bufnr('^'.mkd[0].'$') > 0 && emptytail 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') \ ? b:ctrlp_working_path_mode : s:pathmode if exists('g:ctrlp_extensions') - if index(g:ctrlp_extensions, 'undo') >= 0 - \ && v:version > 702 && has('patch005') && exists('*undotree') + if index(g:ctrlp_extensions, 'undo') >= 0 && exists('*undotree') + \ && ( v:version > 703 || ( v:version == 703 && has('patch005') ) ) let s:undotree = undotree() en if index(g:ctrlp_extensions, 'tag') >= 0 diff --git a/autoload/ctrlp/undo.vim b/autoload/ctrlp/undo.vim index 38c95a0..9b371d8 100644 --- a/autoload/ctrlp/undo.vim +++ b/autoload/ctrlp/undo.vim @@ -13,7 +13,7 @@ " Init {{{1 if ( exists('g:loaded_ctrlp_undo') && g:loaded_ctrlp_undo ) - \ || !( v:version > 702 && has('patch005') ) + \ || !( v:version > 703 || ( v:version == 703 && has('patch005') ) ) fini en let g:loaded_ctrlp_undo = 1