Merge pull request #10841 from janlazo/vim-7.4.1407

vim-patch:7.4.1407,8.1.1111
This commit is contained in:
Daniel Hahler
2019-08-25 21:04:17 +02:00
committed by GitHub
4 changed files with 50 additions and 8 deletions

View File

@@ -47,6 +47,7 @@
#include "nvim/indent_c.h"
#include "nvim/indent.h"
#include "nvim/mark.h"
#include "nvim/math.h"
#include "nvim/mbyte.h"
#include "nvim/memline.h"
#include "nvim/memory.h"
@@ -11289,7 +11290,6 @@ static void f_has(typval_T *argvars, typval_T *rettv, FunPtr fptr)
#endif
"tablineat",
"tag_binary",
"tag_old_static",
"termguicolors",
"termresponse",
"textobjects",
@@ -12042,6 +12042,21 @@ static void f_islocked(typval_T *argvars, typval_T *rettv, FunPtr fptr)
clear_lval(&lv);
}
// "isinf()" function
static void f_isinf(typval_T *argvars, typval_T *rettv, FunPtr fptr)
{
if (argvars[0].v_type == VAR_FLOAT
&& xisinf(argvars[0].vval.v_float)) {
rettv->vval.v_number = argvars[0].vval.v_float > 0.0 ? 1 : -1;
}
}
// "isnan()" function
static void f_isnan(typval_T *argvars, typval_T *rettv, FunPtr fptr)
{
rettv->vval.v_number = argvars[0].v_type == VAR_FLOAT
&& xisnan(argvars[0].vval.v_float);
}
/// Turn a dictionary into a list
///