summaryrefslogtreecommitdiffstats
path: root/src/drawscreen.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-02-12 20:28:01 +0100
committerChristian Brabandt <cb@256bit.org>2024-02-12 20:28:01 +0100
commitf2d90a351159fd6843f450850f52004f42e00183 (patch)
treeb568a8b2eaf3cc33bba3af800c14f613b2b18cc3 /src/drawscreen.c
parenta0010a186d93187d2b69b857d75db8a1e01049bb (diff)
patch 9.1.0100: Redrawing can be improved with undo and 'spell'v9.1.0100
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>
Diffstat (limited to 'src/drawscreen.c')
-rw-r--r--src/drawscreen.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/drawscreen.c b/src/drawscreen.c
index d1773701da..852d331826 100644
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -1408,7 +1408,7 @@ fold_line(
* - if wp->w_buffer->b_mod_set set, update lines between
* b_mod_top and b_mod_bot.
* - if wp->w_redraw_top non-zero, redraw lines between
- * wp->w_redraw_top and wp->w_redr_bot.
+ * wp->w_redraw_top and wp->w_redraw_bot.
* - continue redrawing when syntax status is invalid.
* 4. if scrolled up, update lines at the bottom.
* This results in three areas that may need updating:
@@ -1567,14 +1567,6 @@ win_update(win_T *wp)
else
#endif
- if (buf->b_mod_set && buf->b_mod_xlines != 0 && wp->w_redraw_top != 0)
- {
- // When there are both inserted/deleted lines and specific lines to be
- // redrawn, w_redraw_top and w_redraw_bot may be invalid, just redraw
- // everything (only happens when redrawing is off for while).
- type = UPD_NOT_VALID;
- }
- else
{
// Set mod_top to the first line that needs displaying because of
// changes. Set mod_bot to the first line after the changes.