diff options
author | ZyX <kp-pav@yandex.ru> | 2017-02-23 01:27:45 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-02-23 19:48:41 +0300 |
commit | 8faa4af39673ac032362b62662eb049f588fef81 (patch) | |
tree | 9a6ec3c71e1b1c5670f160baaaf4528b98cc70c7 /src/nvim/terminal.c | |
parent | 6550caee50b96cb69d923204b13dcbb2de9232b2 (diff) | |
download | rneovim-8faa4af39673ac032362b62662eb049f588fef81.tar.gz rneovim-8faa4af39673ac032362b62662eb049f588fef81.tar.bz2 rneovim-8faa4af39673ac032362b62662eb049f588fef81.zip |
api: Rename dict_set_value to dict_set_var
Reasonings:
1. It is not used for anything, but scope dictionaries currenly. So there is no
need to generalize and split it into dict_set_var (which will contain some
scope-dictionary-specific checks) and dict_set_value (which will work for any
dictionary).
2. Check for key size is no longer valid for non-scope dictionaries: you *can*
use empty keys there. In scope dictionaries also, but you actually are not
supposed to store there anything, but variables.
Note that actually one may still do
let b:[''] = 1
and “bypass” check for variable name. It won’t change what `echo b:` will show,
but it may affect code which iterates over scope dictionary keys and sets them
to something (if there is such code).
Diffstat (limited to 'src/nvim/terminal.c')
-rw-r--r-- | src/nvim/terminal.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c index 02500a407c..76839a9cea 100644 --- a/src/nvim/terminal.c +++ b/src/nvim/terminal.c @@ -623,12 +623,12 @@ static void buf_set_term_title(buf_T *buf, char *title) FUNC_ATTR_NONNULL_ALL { Error err; - dict_set_value(buf->b_vars, - cstr_as_string("term_title"), - STRING_OBJ(cstr_as_string(title)), - false, - false, - &err); + dict_set_var(buf->b_vars, + STATIC_CSTR_AS_STRING("term_title"), + STRING_OBJ(cstr_as_string(title)), + false, + false, + &err); } static int term_settermprop(VTermProp prop, VTermValue *val, void *data) |