1
0
forked from aniani/vim

patch 7.4.741

Problem:    When using += with ":set" a trailing comma is not recognized.
            (Issue 365)
Solution:   Don't add a second comma. Add a test. (partly by Christian
            Brabandt)
This commit is contained in:
Bram Moolenaar
2015-06-19 14:06:43 +02:00
parent 541f92d6cf
commit a7b7b1cef9
10 changed files with 27 additions and 1 deletions

View File

@@ -4829,6 +4829,10 @@ do_set(arg, opt_flags)
if (adding)
{
i = (int)STRLEN(origval);
/* strip a trailing comma, would get 2 */
if (comma && i > 1 && origval[i - 1] == ','
&& origval[i - 2] != '\\')
i--;
mch_memmove(newval + i + comma, newval,
STRLEN(newval) + 1);
mch_memmove(newval, origval, (size_t)i);