runtime(vim): Update base syntax and generator, improve command/function distinction
- Match Ex command modifiers and functions with the same name correctly. E.g., :browse and browse(). - Match full :eval command. closes: #17789 Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
2e58b7684f
commit
2f7c957c8d
@ -297,6 +297,7 @@ g:substitute#substitute()
|
||||
# chained function calls
|
||||
|
||||
module.foo().bar()
|
||||
module.foo().substitute()
|
||||
|
||||
|
||||
# Issue 16721 (Vim script highlight of builtin function after |)
|
||||
@ -312,4 +313,5 @@ if !isdirectory(&directory) | mkdir(&directory, "p") | endif
|
||||
# Issue #17766 (valid function call highlighted as error)
|
||||

|
||||
module[0].foo()
|
||||
module[0].substitute()
|
||||
|
||||
|
||||
14
runtime/syntax/testdir/input/vim_ex_eval.vim
Normal file
14
runtime/syntax/testdir/input/vim_ex_eval.vim
Normal file
@ -0,0 +1,14 @@
|
||||
" Vim :eval command
|
||||
|
||||
|
||||
eval "Foo"->append(0)
|
||||
|
||||
eval "Foo"
|
||||
\ ->append(
|
||||
\ 0
|
||||
\ )
|
||||
|
||||
eval "Foo"->append(0) | echo "Foo"
|
||||
|
||||
echo "Foo" | eval "Foo"->append(0)
|
||||
|
||||
@ -267,9 +267,11 @@ call g:substitute#substitute()
|
||||
" chained function calls
|
||||
|
||||
call module.foo().bar()
|
||||
call module.foo().substitute()
|
||||
|
||||
|
||||
" Issue #17766 (valid function call highlighted as error)
|
||||

|
||||
call module[0].foo()
|
||||
call module[0].substitute()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user