aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2023-10-30 20:06:57 +0100
committerGitHub <noreply@github.com>2023-10-30 20:06:57 +0100
commit6d1a2f2c3c51560555ea6f7867273635d07eb287 (patch)
treeb1a29752324ea1f455a77b5b46e545bc372e5c4b /src/nvim/eval.c
parent788bc12a6f4c5a4627cbc75a2f539bfc622384a2 (diff)
parente19cc9c9b715d8171f7940632b8855104b5290b6 (diff)
downloadrneovim-6d1a2f2c3c51560555ea6f7867273635d07eb287.tar.gz
rneovim-6d1a2f2c3c51560555ea6f7867273635d07eb287.tar.bz2
rneovim-6d1a2f2c3c51560555ea6f7867273635d07eb287.zip
Merge pull request #25674 from famiu/refactor/options/unify_string_options
refactor(options): unify `set_option` and `set_string_option`
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 20d76334f6..8ffc6fd179 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -7229,12 +7229,11 @@ void set_vim_var_dict(const VimVarIndex idx, dict_T *const val)
/// Set v:variable to tv.
///
/// @param[in] idx Index of variable to set.
-/// @param[in,out] val Value to set to. Reference count will be incremented.
-/// Also keys of the dictionary will be made read-only.
+/// @param[in] val Value to set to. Will be copied.
void set_vim_var_tv(const VimVarIndex idx, typval_T *const tv)
{
tv_clear(&vimvars[idx].vv_di.di_tv);
- vimvars[idx].vv_di.di_tv = *tv;
+ tv_copy(tv, &vimvars[idx].vv_di.di_tv);
}
/// Set the v:argv list.