Skip to content

Commit e89aeed

Browse files
committed
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 #10958)
1 parent 171c683 commit e89aeed

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/drawline.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
/*
1111
* drawline.c: Functions for drawing window lines on the screen.
12-
* This is the middle level, drawscreen. is the higher level and screen.c the
12+
* This is the middle level, drawscreen.c is the higher level and screen.c the
1313
* lower level.
1414
*/
1515

@@ -339,6 +339,11 @@ text_prop_compare(const void *s1, const void *s2)
339339
// same priority, one that starts first wins
340340
if (col1 != col2)
341341
return col1 < col2 ? 1 : -1;
342+
343+
// for a property with text the id can be used as tie breaker
344+
if (tp1->tp_id < 0)
345+
return tp1->tp_id > tp2->tp_id ? 1 : -1;
346+
342347
return 0;
343348
}
344349
#endif

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,8 @@ static char *(features[]) =
731731

732732
static int included_patches[] =
733733
{ /* Add new patch number below this line */
734+
/**/
735+
243,
734736
/**/
735737
242,
736738
/**/

0 commit comments

Comments
 (0)