diff options
author | Billy Su <g4691821@gmail.com> | 2020-04-28 23:21:50 +0800 |
---|---|---|
committer | Billy Su <g4691821@gmail.com> | 2020-06-06 23:24:58 +0800 |
commit | 1805fb469a39d998f9bef0415999aa835d051044 (patch) | |
tree | e840cff3201d735955eab935a35d3437f497607f /src/nvim/eval/encode.c | |
parent | dbc8ec94464049311e69274cad562585d7bb6749 (diff) | |
download | rneovim-1805fb469a39d998f9bef0415999aa835d051044.tar.gz rneovim-1805fb469a39d998f9bef0415999aa835d051044.tar.bz2 rneovim-1805fb469a39d998f9bef0415999aa835d051044.zip |
vim-patch:8.2.0111: VAR_SPECIAL is also used for booleans
Problem: VAR_SPECIAL is also used for booleans.
Solution: Add VAR_BOOL for better type checking.
https://github.com/vim/vim/commit/9b4a15d5dba354d2e1e02871470bad103f34769a
Diffstat (limited to 'src/nvim/eval/encode.c')
-rw-r--r-- | src/nvim/eval/encode.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nvim/eval/encode.c b/src/nvim/eval/encode.c index 138f638eb2..137f099df6 100644 --- a/src/nvim/eval/encode.c +++ b/src/nvim/eval/encode.c @@ -34,10 +34,13 @@ #define utf_ptr2len(b) ((size_t)utf_ptr2len((char_u *)b)) #define utf_char2len(b) ((size_t)utf_char2len(b)) +const char *const encode_bool_var_names[] = { + [kBoolVarTrue] = "true", + [kBoolVarFalse] = "false", +}; + const char *const encode_special_var_names[] = { [kSpecialVarNull] = "null", - [kSpecialVarTrue] = "true", - [kSpecialVarFalse] = "false", }; #ifdef INCLUDE_GENERATED_DECLARATIONS |