diff src/eval.c @ 34288:6df143135376 v9.1.0080

patch 9.1.0080: unexpected error for modifying final list using += Commit: https://github.com/vim/vim/commit/1af35631f85d2fcdc83c5d457af8273697f5146a Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Tue Feb 6 11:03:36 2024 +0100 patch 9.1.0080: unexpected error for modifying final list using += Problem: unexpected error for modifying final list using += operator (Ernie Rael) Solution: Allow List value modification of a final variable using += operator (Yegappan Lakshmanan) fixes: #13745 fixes: #13959 closes: #13962 Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Tue, 06 Feb 2024 11:15:05 +0100
parents c4ad4778946c
children 5c1a025192ed
line wrap: on
line diff
--- a/src/eval.c
+++ b/src/eval.c
@@ -1901,7 +1901,7 @@ set_var_lval(
 			   && !tv_check_lock(&di->di_tv, lp->ll_name, FALSE)))
 			&& tv_op(&tv, rettv, op) == OK)
 		    set_var_const(lp->ll_name, lp->ll_sid, NULL, &tv, FALSE,
-							    ASSIGN_NO_DECL, 0);
+				ASSIGN_NO_DECL | ASSIGN_COMPOUND_OP, 0);
 		clear_tv(&tv);
 	    }
 	}