summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-08-29 22:48:24 +0200
committerBram Moolenaar <Bram@vim.org>2019-08-29 22:48:24 +0200
commit34ed68d40eb9c71f34a44b94263f5e7e6856cba0 (patch)
treeb8a50afb483bacd4d183ef83d413fc797a064e56
parente5cdf153bcb348c68011b308c8988cea42d6ddeb (diff)
downloadvim-git-34ed68d40eb9c71f34a44b94263f5e7e6856cba0.tar.gz
patch 8.1.1940: script tests failv8.1.1940
Problem: Script tests fail. Solution: Don't set vimvars type in set_vim_var_nr().
-rw-r--r--src/eval.c3
-rw-r--r--src/evalvars.c10
-rw-r--r--src/proto/evalvars.pro1
-rw-r--r--src/version.c2
4 files changed, 15 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c
index 9295993b9..fb2f804e7 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -7879,6 +7879,7 @@ filter_map(typval_T *argvars, typval_T *rettv, int map)
int i;
typval_T tv;
+ set_vim_var_type(VV_KEY, VAR_NUMBER);
for (i = 0; i < b->bv_ga.ga_len; i++)
{
tv.v_type = VAR_NUMBER;
@@ -7907,6 +7908,8 @@ filter_map(typval_T *argvars, typval_T *rettv, int map)
else
{
// argvars[0].v_type == VAR_LIST
+ set_vim_var_type(VV_KEY, VAR_NUMBER);
+
for (li = l->lv_first; li != NULL; li = nli)
{
if (map && var_check_lock(li->li_tv.v_lock, arg_errmsg, TRUE))
diff --git a/src/evalvars.c b/src/evalvars.c
index c087d85cc..bbe140379 100644
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -1691,12 +1691,20 @@ get_user_var_name(expand_T *xp, int idx)
}
/*
+ * Set type of v: variable to "type".
+ */
+ void
+set_vim_var_type(int idx, vartype_T type)
+{
+ vimvars[idx].vv_type = type;
+}
+
+/*
* Set number v: variable to "val".
*/
void
set_vim_var_nr(int idx, varnumber_T val)
{
- vimvars[idx].vv_type = VAR_NUMBER;
vimvars[idx].vv_nr = val;
}
diff --git a/src/proto/evalvars.pro b/src/proto/evalvars.pro
index fde1adac1..6226d43ce 100644
--- a/src/proto/evalvars.pro
+++ b/src/proto/evalvars.pro
@@ -15,6 +15,7 @@ void ex_unlet(exarg_T *eap);
void ex_lockvar(exarg_T *eap);
int do_unlet(char_u *name, int forceit);
char_u *get_user_var_name(expand_T *xp, int idx);
+void set_vim_var_type(int idx, vartype_T type);
void set_vim_var_nr(int idx, varnumber_T val);
typval_T *get_vim_var_tv(int idx);
varnumber_T get_vim_var_nr(int idx);
diff --git a/src/version.c b/src/version.c
index a2e9bee27..f0ccfe3b0 100644
--- a/src/version.c
+++ b/src/version.c
@@ -762,6 +762,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1940,
+/**/
1939,
/**/
1938,