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:
@@ -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()
|
||||
|
Reference in New Issue
Block a user