Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
17449:3f12449a6020 | 17450:509542f1fffb |
---|---|
1281 marker_indent_len++; | 1281 marker_indent_len++; |
1282 } | 1282 } |
1283 text_indent_len = -1; | 1283 text_indent_len = -1; |
1284 } | 1284 } |
1285 | 1285 |
1286 // The marker is the next word. Default marker is "." | 1286 // The marker is the next word. |
1287 if (*cmd != NUL && *cmd != '"') | 1287 if (*cmd != NUL && *cmd != '"') |
1288 { | 1288 { |
1289 marker = skipwhite(cmd); | 1289 marker = skipwhite(cmd); |
1290 p = skiptowhite(marker); | 1290 p = skiptowhite(marker); |
1291 if (*skipwhite(p) != NUL && *skipwhite(p) != '"') | 1291 if (*skipwhite(p) != NUL && *skipwhite(p) != '"') |
1292 { | 1292 { |
1293 emsg(_(e_trailing)); | 1293 emsg(_(e_trailing)); |
1294 return NULL; | 1294 return NULL; |
1295 } | 1295 } |
1296 *p = NUL; | 1296 *p = NUL; |
1297 if (vim_islower(*marker)) | |
1298 { | |
1299 emsg(_("E221: Marker cannot start with lower case letter")); | |
1300 return NULL; | |
1301 } | |
1297 } | 1302 } |
1298 else | 1303 else |
1299 marker = (char_u *)"."; | 1304 { |
1305 emsg(_("E172: Missing marker")); | |
1306 return NULL; | |
1307 } | |
1300 | 1308 |
1301 l = list_alloc(); | 1309 l = list_alloc(); |
1302 if (l == NULL) | 1310 if (l == NULL) |
1303 return NULL; | 1311 return NULL; |
1304 | 1312 |