Mercurial > vim
comparison src/testdir/test_vim9_func.vim @ 21544:6c67c86a202a v8.2.1322
patch 8.2.1322: Vim9: method on double quoted string doesn't work
Commit: https://github.com/vim/vim/commit/1040956292a9f2c3d02fc08febd5acf349c85590
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jul 29 20:00:38 2020 +0200
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 https://github.com/vim/vim/issues/6562)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 29 Jul 2020 20:15:03 +0200 |
parents | e87a97868bbc |
children | 1c4d4aa22b37 |
comparison
equal
deleted
inserted
replaced
21543:456123afa2ec | 21544:6c67c86a202a |
---|---|
500 assert_equal('text', var) | 500 assert_equal('text', var) |
501 ("some")->MyFunc() | 501 ("some")->MyFunc() |
502 assert_equal('some', var) | 502 assert_equal('some', var) |
503 | 503 |
504 # line starting with single quote is not a mark | 504 # line starting with single quote is not a mark |
505 # line starting with double quote can be a method call | |
505 'asdfasdf'->MyFunc() | 506 'asdfasdf'->MyFunc() |
506 assert_equal('asdfasdf', var) | 507 assert_equal('asdfasdf', var) |
508 "xyz"->MyFunc() | |
509 assert_equal('xyz', var) | |
507 | 510 |
508 def UseString() | 511 def UseString() |
509 'xyork'->MyFunc() | 512 'xyork'->MyFunc() |
510 enddef | 513 enddef |
511 UseString() | 514 UseString() |
512 assert_equal('xyork', var) | 515 assert_equal('xyork', var) |
516 | |
517 def UseString2() | |
518 "knife"->MyFunc() | |
519 enddef | |
520 UseString2() | |
521 assert_equal('knife', var) | |
513 | 522 |
514 # prepending a colon makes it a mark | 523 # prepending a colon makes it a mark |
515 new | 524 new |
516 setline(1, ['aaa', 'bbb', 'ccc']) | 525 setline(1, ['aaa', 'bbb', 'ccc']) |
517 normal! 3Gmt1G | 526 normal! 3Gmt1G |