diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-08-22 13:00:16 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-08-22 13:00:16 +0100 |
commit | e89aeed43e6eca1bda5379cf9b437bce3bc56628 (patch) | |
tree | 44bfa202dda1244aa6e7bb9680128a2117639415 /src/drawline.c | |
parent | 171c683237149262665135c7d5841a89bb156f53 (diff) | |
download | vim-git-e89aeed43e6eca1bda5379cf9b437bce3bc56628.tar.gz |
patch 9.0.0243: text properties "below" sort differently on MS-Windowsv9.0.0243
Problem: Text properties "below" sort differently on MS-Windows.
Solution: Use the ID as a tie breaker. (closes #10958)
Diffstat (limited to 'src/drawline.c')
-rw-r--r-- | src/drawline.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/drawline.c b/src/drawline.c index 9ad6ecb94..b29f5b19a 100644 --- 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 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 |