diff src/scriptfile.c @ 24774:8bf9726097d8 v8.2.2925

patch 8.2.2925: Vim9: line continuation comment uses legacy syntax Commit: https://github.com/vim/vim/commit/0f37e3561db95b0ef0b636588bbd30297e377384 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jun 2 15:28:15 2021 +0200 patch 8.2.2925: Vim9: line continuation comment uses legacy syntax Problem: Vim9: line continuation comment uses legacy syntax. Solution: Check for #\ instead of "\. (closes https://github.com/vim/vim/issues/8295)
author Bram Moolenaar <Bram@vim.org>
date Wed, 02 Jun 2021 15:30:02 +0200
parents 4919f2d8d7fd
children 524120691c3d
line wrap: on
line diff
--- a/src/scriptfile.c
+++ b/src/scriptfile.c
@@ -1842,7 +1842,8 @@ getsourceline(
 			ga_concat(&ga, p);
 		    }
 		}
-		else if (!(p[0] == '"' && p[1] == '\\' && p[2] == ' ')
+		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 */