diff src/edit.c @ 29579:f7a64755dbe9 v9.0.0130

patch 9.0.0130: cursor position wrong when inserting around virtual text Commit: https://github.com/vim/vim/commit/1f4ee19eefecd8f70b7cbe8ee9db8ace6352e23e Author: Bram Moolenaar <Bram@vim.org> Date: Mon Aug 1 15:52:55 2022 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Mon, 01 Aug 2022 17:00:04 +0200
parents 99e3763cbd34
children 89e1d67814a9
line wrap: on
line diff
--- 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);
 
     /*