1
0
forked from aniani/vim

patch 8.2.3817: Vim9: Not using NL as command end does not work for :autocmd

Problem:    Vim9: Not using NL as command end does not work for :autocmd.
Solution:   Only ignore NL for commands with an expression argument.
This commit is contained in:
Bram Moolenaar
2021-12-15 17:53:40 +00:00
parent 1821d1498c
commit f87dac04c3
4 changed files with 38 additions and 24 deletions

View File

@@ -648,12 +648,23 @@ func Test_usercmd_with_block()
call CheckScriptFailure(lines, 'E1026:')
let lines =<< trim END
command BarCommand {
command HelloThere {
echo 'hello' | echo 'there'
}
BarCommand
HelloThere
END
call CheckScriptFailure(lines, 'E1231:')
call CheckScriptSuccess(lines)
delcommand HelloThere
let lines =<< trim END
command BadCommand {
echo {
'key': 'value',
}
}
BadCommand
END
call CheckScriptFailure(lines, 'E1128:')
endfunc
func Test_delcommand_buffer()