diff src/move.c @ 29708:d97b2ce26258 v9.0.0194

patch 9.0.0194: cursor displayed in wrong position after removing text prop Commit: https://github.com/vim/vim/commit/326c5d36e7cb8526330565109c17b4a13ff790ae Author: Bram Moolenaar <Bram@vim.org> Date: Fri Aug 12 13:05:49 2022 +0100 patch 9.0.0194: cursor displayed in wrong position after removing text prop Problem: Cursor displayed in wrong position after removing text prop. (Ben Jackson) Solution: Invalidate the cursor position. (closes #10898)
author Bram Moolenaar <Bram@vim.org>
date Fri, 12 Aug 2022 14:15:04 +0200
parents 281509f1417b
children 89e1d67814a9
line wrap: on
line diff
--- a/src/move.c
+++ b/src/move.c
@@ -594,6 +594,22 @@ changed_line_abv_curs_win(win_T *wp)
 }
 
 /*
+ * Display of line has changed for "buf", invalidate cursor position and
+ * w_botline.
+ */
+    void
+changed_line_display_buf(buf_T *buf)
+{
+    win_T *wp;
+
+    FOR_ALL_WINDOWS(wp)
+	if (wp->w_buffer == buf)
+	    wp->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL
+				|VALID_CROW|VALID_CHEIGHT
+				|VALID_TOPLINE|VALID_BOTLINE|VALID_BOTLINE_AP);
+}
+
+/*
  * Make sure the value of curwin->w_botline is valid.
  */
     void