0
0
mirror of https://github.com/vim/vim.git synced 2025-10-03 05:14:07 -04:00

patch 8.2.1322: Vim9: method on double quoted string doesn't work

Problem:    Vim9: method on double quoted string doesn't work.
Solution:   Recognize double quoted string. (closes #6562)
This commit is contained in:
Bram Moolenaar
2020-07-29 20:00:38 +02:00
parent 7b7f78f51d
commit 1040956292
4 changed files with 17 additions and 3 deletions

View File

@@ -502,8 +502,11 @@ def Test_vim9script_call()
assert_equal('some', var)
# line starting with single quote is not a mark
# line starting with double quote can be a method call
'asdfasdf'->MyFunc()
assert_equal('asdfasdf', var)
"xyz"->MyFunc()
assert_equal('xyz', var)
def UseString()
'xyork'->MyFunc()
@@ -511,6 +514,12 @@ def Test_vim9script_call()
UseString()
assert_equal('xyork', var)
def UseString2()
"knife"->MyFunc()
enddef
UseString2()
assert_equal('knife', var)
# prepending a colon makes it a mark
new
setline(1, ['aaa', 'bbb', 'ccc'])