Mercurial > vim
diff src/evalfunc.c @ 9770:ba98d7ce0d74 v7.4.2160
commit https://github.com/vim/vim/commit/7dc5e2e486fe0287601968e535902a41a39f65bb
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Aug 5 22:22:06 2016 +0200
patch 7.4.2160
Problem: setmatches() mixes up values. (Nikolai Pavlov)
Solution: Save the string instead of reusing a shared buffer.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 05 Aug 2016 22:30:07 +0200 |
parents | be9b5f8c3fd9 |
children | 5385e72e1ac2 |
line wrap: on
line diff
--- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -9659,11 +9659,11 @@ f_setmatches(typval_T *argvars UNUSED, t } } - 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, t list_unref(s); s = NULL; } + vim_free(group); + vim_free(conceal); li = li->li_next; }