summaryrefslogtreecommitdiff
path: root/src/option.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-06-20 12:40:08 +0200
committerBram Moolenaar <Bram@vim.org>2021-06-20 12:40:08 +0200
commit208f0b48b2c616b29f377a1408290111ed2663f7 (patch)
tree14bd8d18340129cc7d6b0ea0a42d7e5d806a401f /src/option.c
parent2fb749568662c86992aea3b596458b9e470f223d (diff)
downloadvim-git-208f0b48b2c616b29f377a1408290111ed2663f7.tar.gz
patch 8.2.3021: spaces allowed between option name and "!", "?", etc.v8.2.3021
Problem: Spaces allowed between option name and "!", "?", etc. Solution: Disallow spaces in Vim9 script, it was not documented. (closes #8408)
Diffstat (limited to 'src/option.c')
-rw-r--r--src/option.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/option.c b/src/option.c
index dd44fe4ac..535213c19 100644
--- a/src/option.c
+++ b/src/option.c
@@ -1306,9 +1306,10 @@ do_set(
// remember character after option name
afterchar = arg[len];
- // skip white space, allow ":set ai ?"
- while (VIM_ISWHITE(arg[len]))
- ++len;
+ if (!in_vim9script())
+ // skip white space, allow ":set ai ?", ":set hlsearch !"
+ while (VIM_ISWHITE(arg[len]))
+ ++len;
adding = FALSE;
prepending = FALSE;