Mercurial > vim
diff src/scriptfile.c @ 23398:40f824f5c7c7 v8.2.2242
patch 8.2.2242: Vim9: bar line continuation does not work at script level
Commit: https://github.com/vim/vim/commit/8242ebbdba64cfa5c504c9d8dfb802076d99c602
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Dec 29 11:15:01 2020 +0100
patch 8.2.2242: Vim9: bar line continuation does not work at script level
Problem: Vim9: line continuation with bar does not work at script level.
Solution: Check for Vim9 script.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 29 Dec 2020 11:15:34 +0100 |
parents | 517fca70e084 |
children | dc3b7a31c29f |
line wrap: on
line diff
--- a/src/scriptfile.c +++ b/src/scriptfile.c @@ -1741,8 +1741,8 @@ getsourceline( char_u *p; int do_vim9_all = in_vim9script() && options == GETLINE_CONCAT_ALL; - int do_vim9_cont = do_vim9_all - || options == GETLINE_CONCAT_CONTDEF; + int do_bar_cont = do_vim9_all + || options == GETLINE_CONCAT_CONTBAR; #ifdef FEAT_EVAL // If breakpoints have been added/deleted need to check for it. @@ -1797,7 +1797,7 @@ getsourceline( || (p[0] == '"' && p[1] == '\\' && p[2] == ' ') || (do_vim9_all && (*p == NUL || vim9_comment_start(p))) - || (do_vim9_cont && p[0] == '|' && p[1] != '|'))) + || (do_bar_cont && p[0] == '|' && p[1] != '|'))) { garray_T ga; @@ -1817,7 +1817,7 @@ getsourceline( if (sp->nextline == NULL) break; p = skipwhite(sp->nextline); - if (*p == '\\' || (do_vim9_cont && p[0] == '|' && p[1] != '|')) + if (*p == '\\' || (do_bar_cont && p[0] == '|' && p[1] != '|')) { // Adjust the growsize to the current length to speed up // concatenating many lines.