Patch 8.2.1288
Problem: Vim9: cannot use mark in range.
Solution: Use the flag that a colon was seen. (closes #6528)
Files: src/ex_docmd.c, src/testdir/test_vim9_func.vim
*** ../vim-8.2.1287/src/ex_docmd.c 2020-07-23 21:14:39.827891492 +0200
--- src/ex_docmd.c 2020-07-24 18:46:19.055767449 +0200
***************
*** 1773,1779 ****
*/
cmd = ea.cmd;
#ifdef FEAT_EVAL
! starts_with_quote = vim9script && *ea.cmd == '\'';
if (!starts_with_quote)
#endif
ea.cmd = skip_range(ea.cmd, NULL);
--- 1773,1779 ----
*/
cmd = ea.cmd;
#ifdef FEAT_EVAL
! starts_with_quote = vim9script && !starts_with_colon && *ea.cmd == '\'';
if (!starts_with_quote)
#endif
ea.cmd = skip_range(ea.cmd, NULL);
*** ../vim-8.2.1287/src/testdir/test_vim9_func.vim 2020-07-23
20:56:01.215470359 +0200
--- src/testdir/test_vim9_func.vim 2020-07-24 18:44:14.684404571 +0200
***************
*** 405,410 ****
--- 405,411 ----
("some")->MyFunc()
assert_equal('some', var)
+ # line starting with single quote is not a mark
'asdfasdf'->MyFunc()
assert_equal('asdfasdf', var)
***************
*** 414,419 ****
--- 415,428 ----
UseString()
assert_equal('xyork', var)
+ # prepending a colon makes it a mark
+ new
+ setline(1, ['aaa', 'bbb', 'ccc'])
+ normal! 3Gmt1G
+ :'t
+ assert_equal(3, getcurpos()[1])
+ bwipe!
+
MyFunc(
'continued'
)
*** ../vim-8.2.1287/src/version.c 2020-07-23 22:41:39.779937421 +0200
--- src/version.c 2020-07-24 18:45:24.300041367 +0200
***************
*** 756,757 ****
--- 756,759 ----
{ /* Add new patch number below this line */
+ /**/
+ 1288,
/**/
--
hundred-and-one symptoms of being an internet addict:
80. At parties, you introduce your spouse as your "service provider."
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202007241647.06OGlvs2105462%40masaka.moolenaar.net.