]> granicus.if.org Git - vim/commitdiff
patch 8.1.1278: missing change for "combine" field v8.1.1278
authorBram Moolenaar <Bram@vim.org>
Sun, 5 May 2019 14:33:47 +0000 (16:33 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 5 May 2019 14:33:47 +0000 (16:33 +0200)
Problem:    Missing change for "combine" field.
Solution:   Also change the textprop implementation.

src/textprop.c
src/version.c

index 34738adc40891df35de556423cc692d30a590183..b44810a8276ebd87eb9333ca4eb401085759ffda 100644 (file)
@@ -733,6 +733,15 @@ prop_type_set(typval_T *argvars, int add)
            prop->pt_hl_id = hl_id;
        }
 
+       di = dict_find(dict, (char_u *)"combine", -1);
+       if (di != NULL)
+       {
+           if (tv_get_number(&di->di_tv))
+               prop->pt_flags |= PT_FLAG_COMBINE;
+           else
+               prop->pt_flags &= ~PT_FLAG_COMBINE;
+       }
+
        di = dict_find(dict, (char_u *)"priority", -1);
        if (di != NULL)
            prop->pt_priority = tv_get_number(&di->di_tv);
@@ -845,6 +854,8 @@ f_prop_type_get(typval_T *argvars, typval_T *rettv UNUSED)
            if (prop->pt_hl_id > 0)
                dict_add_string(d, "highlight", syn_id2name(prop->pt_hl_id));
            dict_add_number(d, "priority", prop->pt_priority);
+           dict_add_number(d, "combine",
+                                  (prop->pt_flags & PT_FLAG_COMBINE) ? 1 : 0);
            dict_add_number(d, "start_incl",
                            (prop->pt_flags & PT_FLAG_INS_START_INCL) ? 1 : 0);
            dict_add_number(d, "end_incl",
index 7930e3c907a923fc65d1591c7abbd17f5ea95167..0b47695ee4dfd964dcffef6938fed30de5e4e3d3 100644 (file)
@@ -767,6 +767,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1278,
 /**/
     1277,
 /**/