Mercurial > vim
diff src/eval.c @ 17450:509542f1fffb v8.1.1723
patch 8.1.1723: heredoc assignment has no room for new features
commit https://github.com/vim/vim/commit/24582007294b0db3be9669d3b583ea45fc4f19b8
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jul 21 14:14:26 2019 +0200
patch 8.1.1723: heredoc assignment has no room for new features
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 21 Jul 2019 14:15:06 +0200 |
parents | f8cd16838434 |
children | cfdef48743ed |
line wrap: on
line diff
--- 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)