summaryrefslogtreecommitdiff
path: root/src/evalvars.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-01-11 16:05:23 +0100
committerBram Moolenaar <Bram@vim.org>2020-01-11 16:05:23 +0100
commit9b4a15d5dba354d2e1e02871470bad103f34769a (patch)
treee5e49ad3182e07e641cdea0e04c4a8078186c58c /src/evalvars.c
parente05a89ac6399a8c7d164c99fdab6841d999a9128 (diff)
downloadvim-git-9b4a15d5dba354d2e1e02871470bad103f34769a.tar.gz
patch 8.2.0111: VAR_SPECIAL is also used for booleansv8.2.0111
Problem: VAR_SPECIAL is also used for booleans. Solution: Add VAR_BOOL for better type checking.
Diffstat (limited to 'src/evalvars.c')
-rw-r--r--src/evalvars.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/evalvars.c b/src/evalvars.c
index 6ec5c25dc..fbe23c4f1 100644
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -118,8 +118,8 @@ static struct vimvar
{VV_NAME("option_command", VAR_STRING), VV_RO},
{VV_NAME("option_type", VAR_STRING), VV_RO},
{VV_NAME("errors", VAR_LIST), 0},
- {VV_NAME("false", VAR_SPECIAL), VV_RO},
- {VV_NAME("true", VAR_SPECIAL), VV_RO},
+ {VV_NAME("false", VAR_BOOL), VV_RO},
+ {VV_NAME("true", VAR_BOOL), VV_RO},
{VV_NAME("null", VAR_SPECIAL), VV_RO},
{VV_NAME("none", VAR_SPECIAL), VV_RO},
{VV_NAME("vim_did_enter", VAR_NUMBER), VV_RO},
@@ -1675,6 +1675,7 @@ item_lock(typval_T *tv, int deep, int lock)
case VAR_FUNC:
case VAR_PARTIAL:
case VAR_FLOAT:
+ case VAR_BOOL:
case VAR_SPECIAL:
case VAR_JOB:
case VAR_CHANNEL: