0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 7.4.1157

Problem:    type() does not work for v:true, v:none, etc.
Solution:   Add new type numbers.
This commit is contained in:
Bram Moolenaar
2016-01-23 21:59:52 +01:00
parent 2dedb45260
commit f95534c3d4
4 changed files with 40 additions and 0 deletions

View File

@@ -20157,6 +20157,13 @@ f_type(argvars, rettv)
#ifdef FEAT_FLOAT
case VAR_FLOAT: n = 5; break;
#endif
case VAR_SPECIAL:
if (argvars[0].vval.v_number == VVAL_FALSE
|| argvars[0].vval.v_number == VVAL_TRUE)
n = 6;
else
n = 7;
break;
default: EMSG2(_(e_intern2), "f_type()"); n = 0; break;
}
rettv->vval.v_number = n;