aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorJurica Bradaric <jbradaric@gmail.com>2019-10-12 23:47:00 +0200
committerJurica Bradaric <jbradaric@gmail.com>2019-10-13 11:54:54 +0200
commit3b894b1cb18a9d4e399ab5b55004767f63a384c3 (patch)
tree9093a6f6d1b746ece719e71a0ca1c10b4697a710 /src/nvim/eval.c
parentfcc24d0df3b1a6bde82c0e5b90f1392639f3fa5b (diff)
downloadrneovim-3b894b1cb18a9d4e399ab5b55004767f63a384c3.tar.gz
rneovim-3b894b1cb18a9d4e399ab5b55004767f63a384c3.tar.bz2
rneovim-3b894b1cb18a9d4e399ab5b55004767f63a384c3.zip
vim-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 vim/vim#4705) https://github.com/vim/vim/commit/24582007294b0db3be9669d3b583ea45fc4f19b8
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index d314e3a732..7db9386937 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -1548,7 +1548,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);
p = skiptowhite(marker);
@@ -1557,8 +1557,13 @@ heredoc_get(exarg_T *eap, char_u *cmd)
return NULL;
}
*p = NUL;
+ if (islower(*marker)) {
+ EMSG(_("E221: Marker cannot start with lower case letter"));
+ return NULL;
+ }
} else {
- marker = (char_u *)".";
+ EMSG(_("E172: Missing marker"));
+ return NULL;
}
list_T *l = tv_list_alloc(0);