0
0
mirror of https://github.com/vim/vim.git synced 2025-10-13 06:54:15 -04:00

patch 7.4.2160

Problem:    setmatches() mixes up values. (Nikolai Pavlov)
Solution:   Save the string instead of reusing a shared buffer.
This commit is contained in:
Bram Moolenaar
2016-08-05 22:22:06 +02:00
parent 5971dab112
commit 7dc5e2e486
4 changed files with 16 additions and 2 deletions

View File

@@ -9659,11 +9659,11 @@ f_setmatches(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
}
}
group = get_dict_string(d, (char_u *)"group", FALSE);
group = get_dict_string(d, (char_u *)"group", TRUE);
priority = (int)get_dict_number(d, (char_u *)"priority");
id = (int)get_dict_number(d, (char_u *)"id");
conceal = dict_find(d, (char_u *)"conceal", -1) != NULL
? get_dict_string(d, (char_u *)"conceal", FALSE)
? get_dict_string(d, (char_u *)"conceal", TRUE)
: NULL;
if (i == 0)
{
@@ -9677,6 +9677,8 @@ f_setmatches(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
list_unref(s);
s = NULL;
}
vim_free(group);
vim_free(conceal);
li = li->li_next;
}