comparison src/drawline.c @ 29629:2f5610696bcd v9.0.0155

patch 9.0.0155 Problem: No test for what patch 9.0.0155 fixes. Solution: Add a test. Fix typos. (closes #10822) Commit: https://github.com/vim/vim/commit/db9b96d84491131460e5876fe21b9bbc58c73ed7 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Aug 6 17:38:53 2022 +0100 patch 9.0.0155 Problem: No test for what patch 9.0.0155 fixes. Solution: Add a test. Fix typos. (closes https://github.com/vim/vim/issues/10822)
author Bram Moolenaar <Bram@vim.org>
date Sat, 06 Aug 2022 18:45:03 +0200
parents 78418bd45852
children e80174903fdf
comparison
equal deleted inserted replaced
29628:0a8cb672c34c 29629:2f5610696bcd
291 291
292 idx1 = *(int *)s1; 292 idx1 = *(int *)s1;
293 idx2 = *(int *)s2; 293 idx2 = *(int *)s2;
294 tp1 = &current_text_props[idx1]; 294 tp1 = &current_text_props[idx1];
295 tp2 = &current_text_props[idx2]; 295 tp2 = &current_text_props[idx2];
296 pt1 = text_prop_type_by_id(current_buf, tp1->tp_type);
297 pt2 = text_prop_type_by_id(current_buf, tp2->tp_type);
298 if (pt1 == pt2)
299 return 0;
300 if (pt1 == NULL)
301 return -1;
302 if (pt2 == NULL)
303 return 1;
304 if (pt1->pt_priority != pt2->pt_priority)
305 return pt1->pt_priority > pt2->pt_priority ? 1 : -1;
306 col1 = tp1->tp_col; 296 col1 = tp1->tp_col;
307 col2 = tp2->tp_col; 297 col2 = tp2->tp_col;
308 if (col1 == MAXCOL && col2 == MAXCOL) 298 if (col1 == MAXCOL && col2 == MAXCOL)
309 { 299 {
310 int flags1 = 0; 300 int flags1 = 0;
320 if (tp2->tp_flags & TP_FLAG_ALIGN_BELOW) 310 if (tp2->tp_flags & TP_FLAG_ALIGN_BELOW)
321 flags2 = 2; 311 flags2 = 2;
322 if (flags1 != flags2) 312 if (flags1 != flags2)
323 return flags1 < flags2 ? 1 : -1; 313 return flags1 < flags2 ? 1 : -1;
324 } 314 }
315 pt1 = text_prop_type_by_id(current_buf, tp1->tp_type);
316 pt2 = text_prop_type_by_id(current_buf, tp2->tp_type);
317 if (pt1 == pt2)
318 return 0;
319 if (pt1 == NULL)
320 return -1;
321 if (pt2 == NULL)
322 return 1;
323 if (pt1->pt_priority != pt2->pt_priority)
324 return pt1->pt_priority > pt2->pt_priority ? 1 : -1;
325 return col1 == col2 ? 0 : col1 > col2 ? 1 : -1; 325 return col1 == col2 ? 0 : col1 > col2 ? 1 : -1;
326 } 326 }
327 #endif 327 #endif
328 328
329 /* 329 /*
1783 } 1783 }
1784 } 1784 }
1785 1785
1786 // When 'wrap' is off then for "below" we need 1786 // When 'wrap' is off then for "below" we need
1787 // to start a new line explictly. 1787 // to start a new line explictly.
1788 if (!wp->w_p_wrap) 1788 if (below && wlv.col > win_col_off(wp)
1789 && !wp->w_p_wrap)
1789 { 1790 {
1790 draw_screen_line(wp, &wlv); 1791 draw_screen_line(wp, &wlv);
1791 1792
1792 // When line got too long for screen break 1793 // When line got too long for screen break
1793 // here. 1794 // here.