summaryrefslogtreecommitdiffstats
path: root/src/textprop.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-09-01 18:49:30 +0200
committerChristian Brabandt <cb@256bit.org>2023-09-01 18:49:30 +0200
commitce53e3ea55d12d222a73510d772e786b7ae29c8d (patch)
treead4f205fc46fb69d364a198a1b7ab9bbb42175b2 /src/textprop.c
parent7a9d1aa878d8724e28893b968016b86a3a70c63f (diff)
patch 9.0.1836: display wrong with virttext, linebreak and breakindentv9.0.1836
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>
Diffstat (limited to 'src/textprop.c')
-rw-r--r--src/textprop.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/textprop.c b/src/textprop.c
index c6e17951d4..dde389013f 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -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;
}