vim-patch:8.1.0950: using :python sets 'pyxversion' even when not executed (#10891)

Problem:    Using :python sets 'pyxversion' even when not executed.
Solution:   Check the "skip" flag. (Shane Harper, closes vim/vim#3995)
14816ad6e5
This commit is contained in:
Daniel Hahler 2019-08-30 16:43:21 +02:00 committed by GitHub
parent 1ab442db90
commit dd025a18c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View File

@ -67,6 +67,14 @@ func Test_vim_function()
delfunc s:foo
endfunc
func Test_skipped_python_command_does_not_affect_pyxversion()
set pyxversion=0
if 0
python import vim
endif
call assert_equal(0, &pyxversion) " This assertion would have failed with Vim 8.0.0251. (pyxversion was introduced in 8.0.0251.)
endfunc
func _SetUpHiddenBuffer()
py import vim
new

View File

@ -67,6 +67,14 @@ func Test_vim_function()
delfunc s:foo
endfunc
func Test_skipped_python3_command_does_not_affect_pyxversion()
set pyxversion=0
if 0
python3 import vim
endif
call assert_equal(0, &pyxversion) " This assertion would have failed with Vim 8.0.0251. (pyxversion was introduced in 8.0.0251.)
endfunc
func _SetUpHiddenBuffer()
py3 import vim
new