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>
diff --git a/src/textprop.c b/src/textprop.c
index c6e1795..dde3890 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -759,13 +759,12 @@
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;
}