summaryrefslogtreecommitdiff
path: root/src/dict.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-07-04 14:15:00 +0200
committerBram Moolenaar <Bram@vim.org>2020-07-04 14:15:00 +0200
commit962d7213194647e90f9bdc608f693d39dd07cbd5 (patch)
tree3714605c7e29ea8fe42f8cf6b0bc383b0b685ac8 /src/dict.c
parent1c991144c502ade477e1a32fdfd0f78b6299fdc7 (diff)
downloadvim-git-962d7213194647e90f9bdc608f693d39dd07cbd5.tar.gz
patch 8.2.1125: Vim9: double quote can be a string or a commentv8.2.1125
Problem: Vim9: double quote can be a string or a comment. Solution: Only support comments starting with # to avoid confusion.
Diffstat (limited to 'src/dict.c')
-rw-r--r--src/dict.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dict.c b/src/dict.c
index 53824f75d..a549ed71b 100644
--- a/src/dict.c
+++ b/src/dict.c
@@ -787,8 +787,8 @@ get_literal_key(char_u **arg, typval_T *tv)
/*
* Allocate a variable for a Dictionary and fill it from "*arg".
+ * "*arg" points to the "{".
* "literal" is TRUE for #{key: val}
- * "flags" can have EVAL_EVALUATE and other EVAL_ flags.
* Return OK or FAIL. Returns NOTDONE for {expr}.
*/
int
@@ -830,7 +830,7 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
tvkey.v_type = VAR_UNKNOWN;
tv.v_type = VAR_UNKNOWN;
- *arg = skipwhite_and_linebreak_keep_string(*arg + 1, evalarg);
+ *arg = skipwhite_and_linebreak(*arg + 1, evalarg);
while (**arg != '}' && **arg != NUL)
{
if ((literal
@@ -862,7 +862,7 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
goto failret;
}
- *arg = skipwhite_and_linebreak_keep_string(*arg + 1, evalarg);
+ *arg = skipwhite_and_linebreak(*arg + 1, evalarg);
if (eval1(arg, &tv, evalarg) == FAIL) // recursive!
{
if (evaluate)
@@ -904,7 +904,7 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
}
// the "}" can be on the next line
- *arg = skipwhite_and_linebreak_keep_string(*arg, evalarg);
+ *arg = skipwhite_and_linebreak(*arg, evalarg);
if (**arg == '}')
break;
if (!had_comma)