fix(ui): fix cursor position with multiple inline virtual text

vim-patch9.0.0121: cannot put virtual text after or below a line

Problem:    Cannot put virtual text after or below a line.
Solution:   Add "text_align" and "text_wrap" arguments.

b7963df98f

This only patches the fix, not the whole thing.
This commit is contained in:
Ibby
2023-03-19 17:37:28 +11:00
committed by bfredl
parent efa9b299a7
commit a38d7f9984
3 changed files with 32 additions and 5 deletions

View File

@@ -396,12 +396,13 @@ int win_lbr_chartabsize(chartabsize_T *cts, int *headp)
mtkey_t mark = marktree_itr_current(cts->cts_iter);
if (mark.pos.row != cts->cts_row || mark.pos.col > col) {
break;
} else if (mark.pos.col == col) { // TODO: or maybe unconditionally, what if byte-misaligned?
} else if (mark.pos.col
== col) { // TODO(bfredl): or maybe unconditionally, what if byte-misaligned?
if (!mt_end(mark)) {
Decoration decor = get_decor(mark);
if (decor.virt_text_pos == kVTInline) {
cts->cts_cur_text_width = decor.virt_text_width;
size += cts->cts_cur_text_width;
cts->cts_cur_text_width += decor.virt_text_width;
size += decor.virt_text_width;
}
}
}