From 9636ae6a13afaddc8e73e305e2bdf3fc5e42a492 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 15 Apr 2023 14:28:10 +0800 Subject: [PATCH] vim-patch:8.2.3329: v_lock not set when getting value of environment variable Problem: v_lock not set when getting value of environment variable. Solution: Set v_lock to zero. https://github.com/vim/vim/commit/16e63e6d353c8b7337470644ceac02dc5e569db9 Co-authored-by: Bram Moolenaar --- src/nvim/eval.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 6635ba1868..bbe4fe055d 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -4918,6 +4918,7 @@ static int eval_env_var(char **arg, typval_T *rettv, int evaluate) name[len] = (char)cc; rettv->v_type = VAR_STRING; rettv->vval.v_string = string; + rettv->v_lock = VAR_UNLOCKED; } return OK;