vim-patch:9.0.0130: cursor position wrong when inserting around virtual text

Problem:    Cursor position wrong when inserting around virtual text.
Solution:   Update the cursor position properly.

1f4ee19eef

Co-authored-by: tom-anders <13141438+tom-anders@users.noreply.github.com>
This commit is contained in:
Ibby
2023-03-19 18:32:44 +11:00
committed by bfredl
parent a38d7f9984
commit 0e1f3b5acf
4 changed files with 10 additions and 2 deletions

View File

@@ -95,6 +95,10 @@ void decor_remove(buf_T *buf, int row, int row2, Decoration *decor)
{
decor_redraw(buf, row, row2, decor);
if (decor) {
if (kv_size(decor->virt_text) && decor->virt_text_pos == kVTInline) {
assert(buf->b_virt_text_inline > 0);
buf->b_virt_text_inline--;
}
if (kv_size(decor->virt_lines)) {
assert(buf->b_virt_line_blocks > 0);
buf->b_virt_line_blocks--;