mirror of
https://github.com/vim/vim.git
synced 2025-10-02 05:04:20 -04:00
patch 8.2.1247: Vim9: cannot index a character in a string
Problem: Vim9: cannot index a character in a string. Solution: Add ISN_STRINDEX instruction. (closes #6478)
This commit is contained in:
@@ -1509,6 +1509,15 @@ def Test_expr7_trailing()
|
||||
assert_equal(123, d.key)
|
||||
enddef
|
||||
|
||||
def Test_expr7_subscript()
|
||||
let text = 'abcdef'
|
||||
assert_equal('', text[-1])
|
||||
assert_equal('a', text[0])
|
||||
assert_equal('e', text[4])
|
||||
assert_equal('f', text[5])
|
||||
assert_equal('', text[6])
|
||||
enddef
|
||||
|
||||
def Test_expr7_subscript_linebreak()
|
||||
let range = range(
|
||||
3)
|
||||
|
Reference in New Issue
Block a user