0
0
mirror of https://github.com/vim/vim.git synced 2025-11-09 10:37:17 -05:00

patch 9.0.1850: Vim9: wrong line number where options set

Problem:  Vim9: wrong line number where options set
Solution: Set source line number earlier

closes: #13006
closes: #13013

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: LemonBoy <thatlemon@gmail.com>
This commit is contained in:
LemonBoy
2023-09-02 21:52:05 +02:00
committed by Christian Brabandt
parent c8a034210f
commit 32f3461465
3 changed files with 20 additions and 1 deletions

View File

@@ -4332,6 +4332,23 @@ def Test_option_set()
set foldlevel&
enddef
def Test_option_set_line_number()
var lines =<< trim END
vim9script
# line2
# line3
def F()
# line5
&foldlevel = -128
enddef
F()
END
v9.CheckScriptSuccess(lines)
var res = execute('verbose set foldlevel')
assert_match(' foldlevel.*Last set from .*XScriptSuccess\d\+ line 6', res)
enddef
def Test_option_modifier()
# legacy script allows for white space
var lines =<< trim END