aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-07-30 13:31:18 +0800
committerzeertzjq <zeertzjq@outlook.com>2024-07-31 10:49:57 +0800
commit98d05a2dee7b90d7c23a47bc4d96e257c3a3d31e (patch)
treec8036e33b579e4f9e8a5fdc3aa3a649faf517fd9
parent43c137c3d8473ab87b5dad5c4c2414dd1016f663 (diff)
downloadrneovim-98d05a2dee7b90d7c23a47bc4d96e257c3a3d31e.tar.gz
rneovim-98d05a2dee7b90d7c23a47bc4d96e257c3a3d31e.tar.bz2
rneovim-98d05a2dee7b90d7c23a47bc4d96e257c3a3d31e.zip
vim-patch:8.2.3264: Vim9: assign test fails
Problem: Vim9: assign test fails. Solution: Add missing change. https://github.com/vim/vim/commit/f24f51d03035379cf3e5b2dccf489a40bc4ca92a Co-authored-by: Bram Moolenaar <Bram@vim.org>
-rw-r--r--src/nvim/eval/executor.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/eval/executor.c b/src/nvim/eval/executor.c
index 4f83eaa173..bdca0338ed 100644
--- a/src/nvim/eval/executor.c
+++ b/src/nvim/eval/executor.c
@@ -31,9 +31,10 @@ char *e_list_index_out_of_range_nr
int eexe_mod_op(typval_T *const tv1, const typval_T *const tv2, const char *const op)
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_NO_SANITIZE_UNDEFINED
{
- // Can't do anything with a Funcref, a Dict or special value on the right.
+ // Can't do anything with a Funcref or Dict on the right.
+ // v:true and friends only work with "..=".
if (tv2->v_type != VAR_FUNC && tv2->v_type != VAR_DICT
- && tv2->v_type != VAR_BOOL && tv2->v_type != VAR_SPECIAL) {
+ && ((tv2->v_type != VAR_BOOL && tv2->v_type != VAR_SPECIAL) || *op == '.')) {
switch (tv1->v_type) {
case VAR_DICT:
case VAR_FUNC: