0
0
mirror of https://github.com/vim/vim.git synced 2025-10-18 07:54:29 -04:00

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)
This commit is contained in:
Bram Moolenaar
2022-08-12 13:05:49 +01:00
parent e38fc86180
commit 326c5d36e7
8 changed files with 77 additions and 0 deletions

View File

@@ -593,6 +593,22 @@ changed_line_abv_curs_win(win_T *wp)
|VALID_CHEIGHT|VALID_TOPLINE);
}
/*
* 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.
*/