# HG changeset patch # User Daniel Hahler # Date 1299707859 -3600 # Node ID b059a86fd3334e35d7076ff06cfdecfc9b5bedd1 # Parent c839b22aa01560d8f25c7cbec13f93cb8fdcd4c5 Defer warning about incompatible Python. This uses the GundoDidNotLoad approach from 8de0b4ce478380e5c637 also for the "Gundo requires that Vim be compiled with Python 2.4+" error. Also retab the original GundoDidNotLoad code block and fix the English. diff -r c839b22aa015 -r b059a86fd333 plugin/gundo.vim --- a/plugin/gundo.vim Wed Dec 29 15:16:33 2010 -0800 +++ b/plugin/gundo.vim Wed Mar 09 22:57:39 2011 +0100 @@ -17,10 +17,10 @@ let loaded_gundo = 1"}}} if v:version < '703'"{{{ - function! s:GundoDidNotLoad() - echohl WarningMsg|echomsg "Gundo unavailable: requires Vim 7.3+"|echohl None - endfunction - command! -nargs=0 GundoToggle call s:GundoDidNotLoad() + function! s:GundoDidNotLoad() + echohl WarningMsg|echomsg "Gundo unavailable: requires Vim 7.3+"|echohl None + endfunction + command! -nargs=0 GundoToggle call s:GundoDidNotLoad() finish endif"}}} @@ -33,15 +33,15 @@ if sys.version_info[:2] < (2, 4): vim.command('let s:has_supported_python = 0') ENDPYTHON +else + let s:has_supported_python = 0 +endif - " Python version is too old - if !s:has_supported_python - echo "Gundo requires that Vim be compiled with Python 2.4+" - finish - endif -else - " no Python support - echo "Gundo requires that Vim be compiled with Python 2.4+" +if !s:has_supported_python + function! s:GundoDidNotLoad() + echohl WarningMsg|echomsg "Gundo requires Vim to be compiled with Python 2.4+"|echohl None + endfunction + command! -nargs=0 GundoToggle call s:GundoDidNotLoad() finish endif"}}}