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/drawscreen.c b/src/drawscreen.c
index 106ae95..28a2072 100644
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -342,6 +342,13 @@
     update_popups(win_update);
 #endif
 
+#ifdef FEAT_TERMINAL
+    FOR_ALL_WINDOWS(wp)
+	// If this window contains a terminal, after redrawing all windows, the
+	// dirty row range can be reset.
+	term_did_update_window(wp);
+#endif
+
     after_updating_screen(TRUE);
 
     // Clear or redraw the command line.  Done last, because scrolling may