diff options
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index d67db94339..a75cc78b7e 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -377,11 +377,9 @@ void eval_init(void) msgpack_types_dict->dv_lock = VAR_FIXED; set_vim_var_dict(VV_MSGPACK_TYPES, msgpack_types_dict); - set_vim_var_dict(VV_COMPLETED_ITEM, tv_dict_alloc()); + set_vim_var_dict(VV_COMPLETED_ITEM, tv_dict_alloc_lock(VAR_FIXED)); - dict_T *v_event = tv_dict_alloc(); - v_event->dv_lock = VAR_FIXED; - set_vim_var_dict(VV_EVENT, v_event); + set_vim_var_dict(VV_EVENT, tv_dict_alloc_lock(VAR_FIXED)); set_vim_var_list(VV_ERRORS, tv_list_alloc(kListLenUnknown)); set_vim_var_nr(VV_STDERR, CHAN_STDERR); set_vim_var_nr(VV_SEARCHFORWARD, 1L); @@ -1621,7 +1619,7 @@ void list_hashtable_vars(hashtab_T *ht, const char *prefix, int empty, char buf[IOSIZE]; // apply :filter /pat/ to variable name - xstrlcpy(buf, prefix, IOSIZE - 1); + xstrlcpy(buf, prefix, IOSIZE); xstrlcat(buf, (char *)di->di_key, IOSIZE); if (message_filtered((char_u *)buf)) { continue; @@ -6328,7 +6326,7 @@ void get_qf_loc_list(int is_qf, win_T *wp, typval_T *what_arg, if (what_arg->v_type == VAR_UNKNOWN) { tv_list_alloc_ret(rettv, kListLenMayKnow); if (is_qf || wp != NULL) { - (void)get_errorlist(NULL, wp, -1, rettv->vval.v_list); + (void)get_errorlist(NULL, wp, -1, 0, rettv->vval.v_list); } } else { tv_dict_alloc_ret(rettv); @@ -7617,7 +7615,7 @@ char *save_tv_as_string(typval_T *tv, ptrdiff_t *const len, bool endnl) /// @param[out] ret_fnum Set to fnum for marks. /// /// @return Pointer to position or NULL in case of error (e.g. invalid type). -pos_T *var2fpos(const typval_T *const tv, const int dollar_lnum, +pos_T *var2fpos(const typval_T *const tv, const bool dollar_lnum, int *const ret_fnum) FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL { |