# HG changeset patch # User Steve Losh # Date 1287514622 14400 # Node ID b01d889ef2d7fe4ba4e1733fdea1126e9a5a4b3d # Parent 29bbe78a79df8177ca1b07863fb0a5c4a519a1d5# Parent 559c8e71967555b04d66ffb25d22ab29d934d2d2 Merge. diff -r 559c8e719675 -r b01d889ef2d7 plugin/gundo.vim --- a/plugin/gundo.vim Tue Oct 19 09:39:18 2010 +0200 +++ b/plugin/gundo.vim Tue Oct 19 14:57:02 2010 -0400 @@ -16,6 +16,30 @@ "let loaded_gundo = 1 +let s:warning_string = "Gundo requires that Vim be compiled with Python 2.4+" + +" Check for Python support and required version +if has('python') + let s:has_supported_python = 1 + +python << ENDPYTHON +import sys +import vim +if sys.version_info[:2] < (2, 5): + vim.command('let s:has_supported_python = 0') +ENDPYTHON + + " Python version is too old + if !s:has_supported_python + echo s:warning_string + finish + endif +else + " no Python support + echo s:warning_string + finish +endif + if !exists('g:gundo_width') let g:gundo_width = 45 endif