Patch 8.2.2925
Problem: Vim9: line continuation comment uses legacy syntax.
Solution: Check for #\ instead of "\. (closes #8295)
Files: src/scriptfile.c, src/testdir/test_vim9_script.vim
*** ../vim-8.2.2924/src/scriptfile.c 2021-03-17 17:45:55.349935903 +0100
--- src/scriptfile.c 2021-06-02 15:20:39.324912223 +0200
***************
*** 1842,1848 ****
ga_concat(&ga, p);
}
}
! else if (!(p[0] == '"' && p[1] == '\\' && p[2] == ' ')
&& !(do_vim9_all && (*p == NUL || vim9_comment_start(p))))
break;
/* drop a # comment or "\ comment line */
--- 1842,1849 ----
ga_concat(&ga, p);
}
}
! else if (!(p[0] == (in_vim9script() ? '#' : '"')
! && p[1] == '\\' && p[2] == ' ')
&& !(do_vim9_all && (*p == NUL || vim9_comment_start(p))))
break;
/* drop a # comment or "\ comment line */
*** ../vim-8.2.2924/src/testdir/test_vim9_script.vim 2021-05-26
21:10:07.289101476 +0200
--- src/testdir/test_vim9_script.vim 2021-06-02 15:25:08.820336323 +0200
***************
*** 3074,3079 ****
--- 3074,3097 ----
'func Test() # comment',
'endfunc',
], 'E488:')
+
+ var lines =<< trim END
+ vim9script
+ syn region Text
+ \ start='foo'
+ #\ comment
+ \ end='bar'
+ END
+ CheckScriptSuccess(lines)
+
+ lines =<< trim END
+ vim9script
+ syn region Text
+ \ start='foo'
+ "\ comment
+ \ end='bar'
+ END
+ CheckScriptFailure(lines, 'E399:')
enddef
def Test_vim9_comment_gui()
*** ../vim-8.2.2924/src/version.c 2021-06-02 15:08:47.334433838 +0200
--- src/version.c 2021-06-02 15:23:02.052607192 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2925,
/**/
--
It is illegal for anyone to try and stop a child from playfully jumping over
puddles of water.
[real standing law in California, United States of America]
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ 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/202106021328.152DSsGj2568663%40masaka.moolenaar.net.