Mercurial > vim
diff src/textprop.c @ 33103:61fc08239937 v9.0.1836
patch 9.0.1836: display wrong with virttext, linebreak and breakindent
Commit: https://github.com/vim/vim/commit/ce53e3ea55d12d222a73510d772e786b7ae29c8d
Author: zeertzjq <zeertzjq@outlook.com>
Date: Fri Sep 1 18:49:30 2023 +0200
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>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 01 Sep 2023 19:00:07 +0200 |
parents | c7a332a34fe7 |
children | 2c5ae1ce5af2 |
line wrap: on
line diff
--- a/src/textprop.c +++ b/src/textprop.c @@ -759,13 +759,12 @@ text_prop_compare(const void *s1, const 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; }