To: vim_dev@googlegroups.com Subject: Patch 8.2.2925 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///