forked from aniani/vim
patch 9.1.0100: Redrawing can be improved with undo and 'spell'
Problem: When undoing with 'spell', redrawWinline() is called after changed_lines(), while later win_update() sets redraw type to UPD_NOT_VALID, even though w_redraw_top and w_redraw_bot are still valid. Solution: Only set redraw type to UPD_NOT_VALID when inserting/deleting lines after parts of window has pending redraw, i.e., when changed_lines() is called after redrawWinline(). (zeertzjq) closes: #14019 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
a0010a186d
commit
f2d90a3511
@@ -559,6 +559,12 @@ changed_common(
|
||||
if (!redraw_not_allowed && wp->w_redr_type < UPD_VALID)
|
||||
wp->w_redr_type = UPD_VALID;
|
||||
|
||||
// When inserting/deleting lines and the window has specific lines
|
||||
// to be redrawn, w_redraw_top and w_redraw_bot may now be invalid,
|
||||
// so just redraw everything.
|
||||
if (xtra != 0 && wp->w_redraw_top != 0)
|
||||
redraw_win_later(wp, UPD_NOT_VALID);
|
||||
|
||||
// Reset "w_skipcol" if the topline length has become smaller to
|
||||
// such a degree that nothing will be visible anymore, accounting
|
||||
// for 'smoothscroll' <<< or 'listchars' "precedes" marker.
|
||||
|
Reference in New Issue
Block a user