Mercurial > vim
comparison src/vim9script.c @ 20921:187c3fb42c8f v8.2.1012
patch 8.2.1012: Vim9: cannot declare single character script variables
Commit: https://github.com/vim/vim/commit/3b74b6b4bb9a022f8c6f6e544360d628e10df1ab
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jun 19 19:01:43 2020 +0200
patch 8.2.1012: Vim9: cannot declare single character script variables
Problem: Vim9: cannot declare single character script variables.
Solution: Don't see "b:", "s:", etc. as namespace. Fix item size of
sn_var_vals.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 19 Jun 2020 19:15:03 +0200 |
parents | 96bf2b304932 |
children | 4d844a65183d |
comparison
equal
deleted
inserted
replaced
20920:5469fca04251 | 20921:187c3fb42c8f |
---|---|
469 semsg(_(e_invarg2), arg); | 469 semsg(_(e_invarg2), arg); |
470 return arg + STRLEN(arg); | 470 return arg + STRLEN(arg); |
471 } | 471 } |
472 | 472 |
473 for (p = arg + 1; *p != NUL && eval_isnamec(*p); MB_PTR_ADV(p)) | 473 for (p = arg + 1; *p != NUL && eval_isnamec(*p); MB_PTR_ADV(p)) |
474 if (*p == ':' && p != arg + 1) | 474 if (*p == ':' && (VIM_ISWHITE(p[1]) || p != arg + 1)) |
475 break; | 475 break; |
476 | 476 |
477 if (*p != ':') | 477 if (*p != ':') |
478 { | 478 { |
479 emsg(_(e_type_req)); | 479 emsg(_(e_type_req)); |