Mercurial > vim
comparison src/vim9expr.c @ 28002:1012048eed26 v8.2.4526
patch 8.2.4526: Vim9: cannot set variables to a null value
Commit: https://github.com/vim/vim/commit/8acb9cc6209768ca7ec75c9f7af8c389312ea8d6
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Mar 8 13:18:55 2022 +0000
patch 8.2.4526: Vim9: cannot set variables to a null value
Problem: Vim9: cannot set variables to a null value.
Solution: Add null_list, null_job, etc.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 08 Mar 2022 14:30:05 +0100 |
parents | 532a0c5de1ec |
children | 632a84e2ce92 |
comparison
equal
deleted
inserted
replaced
28001:5357aeb3985f | 28002:1012048eed26 |
---|---|
2105 else | 2105 else |
2106 ret = NOTDONE; | 2106 ret = NOTDONE; |
2107 break; | 2107 break; |
2108 | 2108 |
2109 /* | 2109 /* |
2110 * "null" constant | 2110 * "null" or "null_*" constant |
2111 */ | 2111 */ |
2112 case 'n': if (STRNCMP(*arg, "null", 4) == 0 | 2112 case 'n': if (STRNCMP(*arg, "null", 4) == 0) |
2113 && !eval_isnamec((*arg)[4])) | |
2114 { | 2113 { |
2115 *arg += 4; | 2114 char_u *p = *arg + 4; |
2116 rettv->v_type = VAR_SPECIAL; | 2115 int len; |
2117 rettv->vval.v_number = VVAL_NULL; | 2116 |
2117 for (len = 0; eval_isnamec(p[len]); ++len) | |
2118 ; | |
2119 ret = handle_predefined(*arg, len + 4, rettv); | |
2120 if (ret == FAIL) | |
2121 ret = NOTDONE; | |
2122 else | |
2123 *arg += len + 4; | |
2118 } | 2124 } |
2119 else | 2125 else |
2120 ret = NOTDONE; | 2126 ret = NOTDONE; |
2121 break; | 2127 break; |
2122 | 2128 |