mirror of
https://github.com/vim/vim.git
synced 2025-10-03 05:14:07 -04:00
patch 8.2.2122: Vim9: crash when sourcing vim9script early
Problem: Vim9: crash when sourcing vim9script early. Solution: Use set_option_value() instead of setting p_cpo directly. (closes #7441)
This commit is contained in:
@@ -2857,6 +2857,17 @@ def Test_invalid_sid()
|
||||
delete('Xdidit')
|
||||
enddef
|
||||
|
||||
def Test_restoring_cpo()
|
||||
writefile(['vim9script', 'set nocp'], 'Xsourced')
|
||||
writefile(['call writefile(["done"], "Xdone")', 'quit!'], 'Xclose')
|
||||
if RunVim([], [], '-u NONE +"set cpo+=a" -S Xsourced -S Xclose')
|
||||
assert_equal(['done'], readfile('Xdone'))
|
||||
endif
|
||||
delete('Xsourced')
|
||||
delete('Xclose')
|
||||
enddef
|
||||
|
||||
|
||||
def Test_unset_any_variable()
|
||||
var lines =<< trim END
|
||||
var name: any
|
||||
|
Reference in New Issue
Block a user