1
0
forked from aniani/vim

patch 9.0.1836: display wrong with virttext, linebreak and breakindent

Problem:  Wrong display with "above" virtual text and 'linebreak' or
          'breakindent' and 'showbreak'.
Solution: Exclude size of "above" virtual text when calculating them.

closes: #13000

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
zeertzjq
2023-09-01 18:49:30 +02:00
committed by Christian Brabandt
parent 7a9d1aa878
commit ce53e3ea55
12 changed files with 119 additions and 11 deletions

View File

@@ -759,13 +759,12 @@ text_prop_compare(const void *s1, const void *s2)
tp2 = &text_prop_compare_props[idx2];
col1 = tp1->tp_col;
col2 = tp2->tp_col;
if (col1 == MAXCOL && col2 == MAXCOL)
if (col1 == MAXCOL || col2 == MAXCOL)
{
int order1 = text_prop_order(tp1->tp_flags);
int order2 = text_prop_order(tp2->tp_flags);
// both props add text before or after the line, sort on order where it
// is added
// sort on order where it is added
if (order1 != order2)
return order1 < order2 ? 1 : -1;
}