forked from aniani/vim
patch 9.1.0994: Vim9: not able to use comment after opening curly brace
Problem: Vim9: not able to use comment after opening curly brace
(lifepillar)
Solution: allow to use comments after curly braces of an inner-block,
modify the logic to search for comment in a line, update Vim9
tests to use specific class type instead of any
(Yegappan Lakshmanan)
fixes: #16363
closes: #16405
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
c97e869535
commit
0072ceedc6
@@ -4697,6 +4697,23 @@ def Test_test_override_defcompile()
|
||||
test_override('defcompile', 0)
|
||||
enddef
|
||||
|
||||
" Test for using a comment after the opening curly brace of an inner block.
|
||||
def Test_comment_after_inner_block()
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
|
||||
def F(G: func)
|
||||
enddef
|
||||
|
||||
F(() => { # comment1
|
||||
F(() => { # comment2
|
||||
echo 'ok' # comment3
|
||||
}) # comment4
|
||||
}) # comment5
|
||||
END
|
||||
v9.CheckScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
" The following messes up syntax highlight, keep near the end.
|
||||
if has('python3')
|
||||
def Test_python3_command()
|
||||
|
||||
Reference in New Issue
Block a user