diff options
author | dkearns <dougkearns@gmail.com> | 2024-04-15 04:32:56 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-14 20:32:56 +0200 |
commit | 4ba70cab37d2a625d8c59bb136070ef9d1976934 (patch) | |
tree | b08db573f2267ff4c35d64afc2aab959473c5856 /runtime/syntax/testdir/input/vim_ex_function_nested.vim | |
parent | c59a8648b2d8b3e17f12cd45f74a31b1aa385d2d (diff) |
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 <cb@256bit.org>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Diffstat (limited to 'runtime/syntax/testdir/input/vim_ex_function_nested.vim')
-rw-r--r-- | runtime/syntax/testdir/input/vim_ex_function_nested.vim | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/runtime/syntax/testdir/input/vim_ex_function_nested.vim b/runtime/syntax/testdir/input/vim_ex_function_nested.vim new file mode 100644 index 0000000000..749b57238e --- /dev/null +++ b/runtime/syntax/testdir/input/vim_ex_function_nested.vim @@ -0,0 +1,38 @@ +" Vim :def and :function commands (nested) + +def FunA(): string + def DoFunA(): string + return "." + enddef + + return DoFunA() +enddef + +def FunB(): string + function DoFunB() + return ".." + endfunction + + return DoFunB() +enddef + +function FunC() + def DoFunC(): string + return "..." + enddef + + return DoFunC() +endfunction + +function FunD() + function DoFunD() + return "...." + endfunction + + return DoFunD() +endfunction + +echo FunA() +echo FunB() +echo FunC() +echo FunD() |