0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

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)
This commit is contained in:
Bram Moolenaar
2019-07-21 14:14:26 +02:00
parent 61343f0c44
commit 2458200729
4 changed files with 39 additions and 15 deletions

View File

@@ -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)