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.
diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim
index a733bf1..ff1b134 100644
--- a/src/testdir/test_vim9_script.vim
+++ b/src/testdir/test_vim9_script.vim
@@ -468,6 +468,14 @@
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 @@
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 @@
'vim9script',
'new'
'call setline(1, ["# define pat", "last"])',
- '$',
+ ':$',
'dsearch /pat/ #comment',
'bwipe!',
])
@@ -1907,7 +1915,7 @@
'vim9script',
'new'
'call setline(1, ["# define pat", "last"])',
- '$',
+ ':$',
'dsearch /pat/#comment',
'bwipe!',
], 'E488:')