patch 8.2.3801: if a terminal shows in two windows, only one is redrawn
Problem: If a terminal shows in two windows, only one is redrawn.
Solution: Reset the dirty row range only after redrawing all windows.
(closes #9341)
diff --git a/src/terminal.c b/src/terminal.c
index f584200..f8dc219 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -3850,8 +3850,22 @@
#endif
0);
}
- term->tl_dirty_row_start = MAX_ROW;
- term->tl_dirty_row_end = 0;
+}
+
+/*
+ * Called after updating all windows: may reset dirty rows.
+ */
+ void
+term_did_update_window(win_T *wp)
+{
+ term_T *term = wp->w_buffer->b_term;
+
+ if (term != NULL && term->tl_vterm != NULL && !term->tl_normal_mode
+ && wp->w_redr_type == 0)
+ {
+ term->tl_dirty_row_start = MAX_ROW;
+ term->tl_dirty_row_end = 0;
+ }
}
/*