/*
* Get a string item from a dictionary.
* When "save" is TRUE allocate memory for it.
+ * When FALSE a shared buffer is used, can only be used once!
* Returns NULL if the entry doesn't exist or out of memory.
*/
char_u *
}
}
- 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)
{
list_unref(s);
s = NULL;
}
+ vim_free(group);
+ vim_free(conceal);
li = li->li_next;
}
let OneByRef = funcref('One')
call assert_equal(2, OneByRef())
endfunc
+
+func Test_setmatches()
+ hi def link 1 Comment
+ hi def link 2 PreProc
+ let set = [{"group": 1, "pattern": 2, "id": 3, "priority": 4, "conceal": 5}]
+ let exp = [{"group": '1', "pattern": '2', "id": 3, "priority": 4, "conceal": '5'}]
+ call setmatches(set)
+ call assert_equal(exp, getmatches())
+endfunc
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2160,
/**/
2159,
/**/