mirror of
https://github.com/vim/vim.git
synced 2025-10-05 05:34:07 -04:00
patch 8.2.2124: Vim9: a range cannot be computed at runtime
Problem: Vim9: a range cannot be computed at runtime. Solution: Add the ISN_RANGE instruction.
This commit is contained in:
@@ -614,6 +614,17 @@ def Test_put_command()
|
||||
assert_equal('above', getline(3))
|
||||
assert_equal('below', getline(4))
|
||||
|
||||
# compute range at runtime
|
||||
setline(1, range(1, 8))
|
||||
@a = 'aaa'
|
||||
:$-2put a
|
||||
assert_equal('aaa', getline(7))
|
||||
|
||||
setline(1, range(1, 8))
|
||||
:2
|
||||
:+2put! a
|
||||
assert_equal('aaa', getline(4))
|
||||
|
||||
bwipe!
|
||||
enddef
|
||||
|
||||
|
Reference in New Issue
Block a user