From c44c0c0345c9617185bcb4377741afb42ce14691 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 9 Mar 2011 22:57:39 +0100 Subject: [PATCH] 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. --- plugin/gundo.vim | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/plugin/gundo.vim b/plugin/gundo.vim index 5413381..f8e9226 100644 --- a/plugin/gundo.vim +++ b/plugin/gundo.vim @@ -17,10 +17,10 @@ endif 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 @@ import vim if sys.version_info[:2] < (2, 4): vim.command('let s:has_supported_python = 0') ENDPYTHON - - " 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+" + let s:has_supported_python = 0 +endif + +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"}}}