1
0
forked from aniani/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.
This commit is contained in:
Bram Moolenaar
2022-08-01 15:52:55 +01:00
parent 05a8061eec
commit 1f4ee19eef
6 changed files with 29 additions and 13 deletions

View File

@@ -1589,13 +1589,6 @@ win_line(
n_attr_skip = added;
}
}
// If the cursor is on or after this position,
// move it forward.
if (wp == curwin
&& lnum == curwin->w_cursor.lnum
&& curwin->w_cursor.col >= vcol)
curwin->w_cursor.col += n_extra;
}
// reset the ID in the copy to avoid it being used
// again