1
0
forked from aniani/vim

patch 8.2.4869: expression in command block does not look after NL

Problem:    Expression in command block does not look after NL.
Solution:   Skip over NL to check what follows. (closes #10358)
This commit is contained in:
Bram Moolenaar
2022-05-05 12:20:28 +01:00
parent 2a2707d033
commit e442d59f6d
5 changed files with 38 additions and 16 deletions

View File

@@ -694,6 +694,20 @@ func Test_usercmd_with_block()
call v9.CheckScriptSuccess(lines)
delcommand HelloThere
let lines =<< trim END
command EchoCond {
const test: string = true
? 'true'
: 'false'
g:result = test
}
EchoCond
END
call v9.CheckScriptSuccess(lines)
call assert_equal('true', g:result)
delcommand EchoCond
unlet g:result
let lines =<< trim END
command BadCommand {
echo {