0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 8.2.1042: Vim9: cannot put an operator on the next line

Problem:    Vim9: cannot put an operator on the next line.
Solution:   Require a colon before a range to see if that causes problems.
This commit is contained in:
Bram Moolenaar
2020-06-22 23:02:51 +02:00
parent 7eaafe65ee
commit df069eec3b
7 changed files with 59 additions and 25 deletions

View File

@@ -468,6 +468,14 @@ func Test_const()
call CheckDefFailure(['const &option'], 'E996:')
endfunc
def Test_range_no_colon()
call CheckDefFailure(['%s/a/b/'], 'E1050:')
call CheckDefFailure(['+ s/a/b/'], 'E1050:')
call CheckDefFailure(['- s/a/b/'], 'E1050:')
call CheckDefFailure(['. s/a/b/'], 'E1050:')
enddef
def Test_block()
let outer = 1
{
@@ -1279,7 +1287,7 @@ def Test_echomsg_cmd()
echomsg 'some' 'more' # comment
assert_match('^some more$', Screenline(&lines))
echo 'clear'
1messages
:1messages
assert_match('^some more$', Screenline(&lines))
call CheckDefFailure(['echomsg "xxx"# comment'], 'E488:')
@@ -1898,7 +1906,7 @@ def Test_vim9_comment_not_compiled()
'vim9script',
'new'
'call setline(1, ["# define pat", "last"])',
'$',
':$',
'dsearch /pat/ #comment',
'bwipe!',
])
@@ -1907,7 +1915,7 @@ def Test_vim9_comment_not_compiled()
'vim9script',
'new'
'call setline(1, ["# define pat", "last"])',
'$',
':$',
'dsearch /pat/#comment',
'bwipe!',
], 'E488:')