summaryrefslogtreecommitdiffstats
path: root/src/edit.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-08-01 15:52:55 +0100
committerBram Moolenaar <Bram@vim.org>2022-08-01 15:52:55 +0100
commit1f4ee19eefecd8f70b7cbe8ee9db8ace6352e23e (patch)
tree8ea197ca6ccd87da47eb3f21894f842f77364112 /src/edit.c
parent05a8061eecd9969ee6cde008f54ded77462b649e (diff)
patch 9.0.0130: cursor position wrong when inserting around virtual textv9.0.0130
Problem: Cursor position wrong when inserting around virtual text. Solution: Update the cursor position properly.
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c9
1 files changed, 7 insertions, 2 deletions
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);
/*