changeset 29808:3035901eceb7 v9.0.0243

patch 9.0.0243: text properties "below" sort differently on MS-Windows Commit: https://github.com/vim/vim/commit/e89aeed43e6eca1bda5379cf9b437bce3bc56628 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Aug 22 13:00:16 2022 +0100 patch 9.0.0243: text properties "below" sort differently on MS-Windows Problem: Text properties "below" sort differently on MS-Windows. Solution: Use the ID as a tie breaker. (closes https://github.com/vim/vim/issues/10958)
author Bram Moolenaar <Bram@vim.org>
date Mon, 22 Aug 2022 14:15:03 +0200
parents 9c178879232a
children 7847804c8a72
files src/drawline.c src/version.c
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -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 
     // 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
--- a/src/version.c
+++ b/src/version.c
@@ -732,6 +732,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    243,
+/**/
     242,
 /**/
     241,