diff src/ex_docmd.c @ 20023:c85d4e173cc9 v8.2.0567

patch 8.2.0567: Vim9: cannot put comments halfway expressions Commit: https://github.com/vim/vim/commit/2c330432cfb12181c61d698b5459bfd73d2610df Author: Bram Moolenaar <Bram@vim.org> Date: Mon Apr 13 14:41:35 2020 +0200 patch 8.2.0567: Vim9: cannot put comments halfway expressions Problem: Vim9: cannot put comments halfway expressions. Solution: Support # comments in many places.
author Bram Moolenaar <Bram@vim.org>
date Mon, 13 Apr 2020 14:45:04 +0200
parents 6eb3c91d9875
children 23a4aef4f923
line wrap: on
line diff
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -4764,6 +4764,9 @@ ex_blast(exarg_T *eap)
     int
 ends_excmd(int c)
 {
+    if (c == '#')
+	// TODO: should check for preceding white space
+	return in_vim9script();
     return (c == NUL || c == '|' || c == '"' || c == '\n');
 }