b01d889ef2d7
Merge.
author | Steve Losh <steve@stevelosh.com> |
---|---|
date | Tue, 19 Oct 2010 14:57:02 -0400 |
parents | 29bbe78a79df (diff) 559c8e719675 (current diff) |
children | a96b5f91ecbf |
branches/tags | (none) |
files | plugin/gundo.vim |
Changes
--- 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