summaryrefslogtreecommitdiff
path: root/src/scriptfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/scriptfile.c')
-rw-r--r--src/scriptfile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/scriptfile.c b/src/scriptfile.c
index 203cad09f..15338be63 100644
--- 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 */