1
0
forked from aniani/vim

patch 8.2.3228: cannot use a simple block for the :command argument

Problem:    Cannot use a simple block for the :command argument. (Maarten
            Tournoij)
Solution:   Recognize a simple {} block. (issue #8623)
This commit is contained in:
Bram Moolenaar
2021-07-27 21:17:32 +02:00
parent 53ba05b090
commit 5d7c2df536
6 changed files with 84 additions and 14 deletions

View File

@@ -622,4 +622,22 @@ func Test_usercmd_custom()
delfunc T2
endfunc
func Test_usercmd_with_block()
command DoSomething {
g:didit = 'yes'
g:didmore = 'more'
}
DoSomething
call assert_equal('yes', g:didit)
call assert_equal('more', g:didmore)
unlet g:didit
unlet g:didmore
let lines =<< trim END
command DoesNotEnd {
echo 'hello'
END
call CheckScriptFailure(lines, 'E1026:')
endfunc
" vim: shiftwidth=2 sts=2 expandtab