Patch 8.2.2931
Problem:    Vim9: line continuation comment still uses legacy syntax in one
            place.
Solution:   Check for #\ instead of "\ earlier. (closes #8316)
Files:      src/scriptfile.c, src/testdir/test_vim9_script.vim


*** ../vim-8.2.2930/src/scriptfile.c    2021-06-02 15:28:11.651513682 +0200
--- src/scriptfile.c    2021-06-03 21:52:55.932835218 +0200
***************
*** 1788,1793 ****
--- 1788,1795 ----
      if (line != NULL && options != GETLINE_NONE
                                      && vim_strchr(p_cpo, CPO_CONCAT) == NULL)
      {
+       int comment_char = in_vim9script() ? '#' : '"';
+ 
        // compensate for the one line read-ahead
        --sp->sourcing_lnum;
  
***************
*** 1800,1806 ****
        sp->nextline = get_one_sourceline(sp);
        if (sp->nextline != NULL
                && (*(p = skipwhite(sp->nextline)) == '\\'
!                             || (p[0] == '"' && p[1] == '\\' && p[2] == ' ')
                              || (do_vim9_all && (*p == NUL
                                                     || vim9_comment_start(p)))
                              || (do_bar_cont && p[0] == '|' && p[1] != '|')))
--- 1802,1809 ----
        sp->nextline = get_one_sourceline(sp);
        if (sp->nextline != NULL
                && (*(p = skipwhite(sp->nextline)) == '\\'
!                             || (p[0] == comment_char
!                                               && p[1] == '\\' && p[2] == ' ')
                              || (do_vim9_all && (*p == NUL
                                                     || vim9_comment_start(p)))
                              || (do_bar_cont && p[0] == '|' && p[1] != '|')))
***************
*** 1842,1848 ****
                        ga_concat(&ga, p);
                    }
                }
!               else if (!(p[0] == (in_vim9script() ? '#' : '"')
                                                && p[1] == '\\' && p[2] == ' ')
                     && !(do_vim9_all && (*p == NUL || vim9_comment_start(p))))
                    break;
--- 1845,1851 ----
                        ga_concat(&ga, p);
                    }
                }
!               else if (!(p[0] == (comment_char)
                                                && p[1] == '\\' && p[2] == ' ')
                     && !(do_vim9_all && (*p == NUL || vim9_comment_start(p))))
                    break;
*** ../vim-8.2.2930/src/testdir/test_vim9_script.vim    2021-06-02 
15:28:11.651513682 +0200
--- src/testdir/test_vim9_script.vim    2021-06-03 21:55:27.020509137 +0200
***************
*** 3081,3086 ****
--- 3081,3089 ----
        \ start='foo'
        #\ comment
        \ end='bar'
+       syn region Text start='foo'
+       #\ comment
+       \ end='bar'
    END
    CheckScriptSuccess(lines)
  
*** ../vim-8.2.2930/src/version.c       2021-06-03 20:34:52.958850534 +0200
--- src/version.c       2021-06-03 21:55:55.904446706 +0200
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     2931,
  /**/

-- 
A parent can be arrested if his child cannot hold back a burp during a church
service.
                [real standing law in Nebraska, 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/202106031956.153JulcM2930925%40masaka.moolenaar.net.

Raspunde prin e-mail lui