]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.0243: text properties "below" sort differently on MS-Windows v9.0.0243
authorBram Moolenaar <Bram@vim.org>
Mon, 22 Aug 2022 12:00:16 +0000 (13:00 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 22 Aug 2022 12:00:16 +0000 (13:00 +0100)
Problem:    Text properties "below" sort differently on MS-Windows.
Solution:   Use the ID as a tie breaker. (closes #10958)

src/drawline.c
src/version.c

index 9ad6ecb944280cc70613b68daa85a733cbb261da..b29f5b19aefd79f47b3557a64c73de70a71091fe 100644 (file)
@@ -9,7 +9,7 @@
 
 /*
  * drawline.c: Functions for drawing window lines on the screen.
- * This is the middle level, drawscreen. is the higher level and screen.c the
+ * This is the middle level, drawscreen.c is the higher level and screen.c the
  * lower level.
  */
 
@@ -339,6 +339,11 @@ text_prop_compare(const void *s1, const void *s2)
     // same priority, one that starts first wins
     if (col1 != col2)
        return col1 < col2 ? 1 : -1;
+
+    // for a property with text the id can be used as tie breaker
+    if (tp1->tp_id < 0)
+       return tp1->tp_id > tp2->tp_id ? 1 : -1;
+
     return 0;
 }
 #endif
index a3df5cc164cc5a5ec4c57170090ab614e542123f..a5392e63936959bc83b598c8f4e8194f06f4b44b 100644 (file)
@@ -731,6 +731,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    243,
 /**/
     242,
 /**/