From 1f4ee19eefecd8f70b7cbe8ee9db8ace6352e23e Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 1 Aug 2022 15:52:55 +0100 Subject: 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. --- src/edit.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/edit.c') diff --git a/src/edit.c b/src/edit.c index 0e715c2d1b..c3aa888780 100644 --- a/src/edit.c +++ b/src/edit.c @@ -288,8 +288,13 @@ edit( conceal_check_cursor_line(cursor_line_was_concealed); #endif - // need to position cursor again when on a TAB - if (gchar_cursor() == TAB) + // Need to position cursor again when on a TAB and when on a char with + // virtual text. + if (gchar_cursor() == TAB +#ifdef FEAT_PROP_POPUP + || curbuf->b_has_textprop +#endif + ) curwin->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL); /* -- cgit v1.2.3