From 4ba70cab37d2a625d8c59bb136070ef9d1976934 Mon Sep 17 00:00:00 2001 From: dkearns Date: Mon, 15 Apr 2024 04:32:56 +1000 Subject: runtime(vim): Update base-syntax, fix nested function folding (#14397) Only match function folding start and end patterns at the start of a line, excluding heredocs and :append/:change/:insert commands. Fixes #14393 Signed-off-by: Christian Brabandt Signed-off-by: Doug Kearns --- runtime/syntax/testdir/input/vim_ex_def_nested.vim | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 runtime/syntax/testdir/input/vim_ex_def_nested.vim (limited to 'runtime/syntax/testdir/input/vim_ex_def_nested.vim') diff --git a/runtime/syntax/testdir/input/vim_ex_def_nested.vim b/runtime/syntax/testdir/input/vim_ex_def_nested.vim new file mode 100644 index 0000000000..008c41520a --- /dev/null +++ b/runtime/syntax/testdir/input/vim_ex_def_nested.vim @@ -0,0 +1,20 @@ +vim9script +# Vim9 :def command (nested) + +class Test + const name: string + + def new() + def Name(): string + function GiveName() + return "any" + endfunction + + return GiveName() + enddef + + this.name = Name() + enddef +endclass + +echo Test.new() -- cgit v1.2.3