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

patch 8.2.2806: Vim9: using "++nr" as a command might not work

Problem:    Vim9: using "++nr" as a command might not work.
Solution:   Do not recognize "++" and "--" in a following line as addition or
            subtraction.
This commit is contained in:
Bram Moolenaar
2021-04-24 19:08:24 +02:00
parent 96cf4ba8fb
commit bdc0f1c698
10 changed files with 97 additions and 27 deletions

View File

@@ -1837,5 +1837,21 @@ def Test_script_funcref_case()
CheckScriptFailure(lines, 'E704:')
enddef
def Test_inc_dec()
var lines =<< trim END
var nr = 7
++nr
echo nr
--nr
echo nr
var ll = [1, 2]
--ll[0]
++ll[1]
echo ll
END
CheckDefAndScriptSuccess(lines)
enddef
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker