Skip to content

Commit

Permalink
Defer warning about incompatible Python.
Browse files Browse the repository at this point in the history
This uses the GundoDidNotLoad approach from 8de0b4c 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.
  • Loading branch information
blueyed committed Mar 9, 2011
1 parent 8de0b4c commit c44c0c0
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions plugin/gundo.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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"}}}

Expand All @@ -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"}}}

Expand Down

0 comments on commit c44c0c0

Please sign in to comment.