comparison src/drawline.c @ 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 b167c91b5f6b
children bbe62ea78aac
comparison
equal deleted inserted replaced
29807:9c178879232a 29808:3035901eceb7
7 * See README.txt for an overview of the Vim source code. 7 * See README.txt for an overview of the Vim source code.
8 */ 8 */
9 9
10 /* 10 /*
11 * drawline.c: Functions for drawing window lines on the screen. 11 * 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
13 * lower level. 13 * lower level.
14 */ 14 */
15 15
16 #include "vim.h" 16 #include "vim.h"
17 17
337 } 337 }
338 338
339 // same priority, one that starts first wins 339 // same priority, one that starts first wins
340 if (col1 != col2) 340 if (col1 != col2)
341 return col1 < col2 ? 1 : -1; 341 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
342 return 0; 347 return 0;
343 } 348 }
344 #endif 349 #endif
345 350
346 /* 351 /*