diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-07-21 14:14:26 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-07-21 14:14:26 +0200 |
commit | 24582007294b0db3be9669d3b583ea45fc4f19b8 (patch) | |
tree | bc9d1f58df11d4ec6e1c5afc0a495b81c3bb196f /src/eval.c | |
parent | 61343f0c44c8e71df04918d033e0a744c0b7f8aa (diff) |
patch 8.1.1723: heredoc assignment has no room for new featuresv8.1.1723
Problem: Heredoc assignment has no room for new features. (FUJIWARA Takuya)
Solution: Require the marker does not start with a lower case character.
(closes #4705)
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/eval.c b/src/eval.c index d633f4502e..5a4ed677d5 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1283,7 +1283,7 @@ heredoc_get(exarg_T *eap, char_u *cmd) text_indent_len = -1; } - // The marker is the next word. Default marker is "." + // The marker is the next word. if (*cmd != NUL && *cmd != '"') { marker = skipwhite(cmd); @@ -1294,9 +1294,17 @@ heredoc_get(exarg_T *eap, char_u *cmd) return NULL; } *p = NUL; + if (vim_islower(*marker)) + { + emsg(_("E221: Marker cannot start with lower case letter")); + return NULL; + } } else - marker = (char_u *)"."; + { + emsg(_("E172: Missing marker")); + return NULL; + } l = list_alloc(); if (l == NULL) |