patch 9.0.0307: :echomsg doesn't work properly with cmdheight=0

Problem:    :echomsg doesn't work properly with cmdheight=0.
Solution:   Improve scrolling and displaying.
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 89c9d26..598c6b7 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -8370,9 +8370,14 @@
     // After drawing the statusline screen_attr may still be set.
     screen_stop_highlight();
 
-    // Reset msg_didout, so that a message that's there is overwritten.
-    msg_didout = FALSE;
-    msg_col = 0;
+#ifdef HAS_MESSAGE_WINDOW
+    if (!use_message_window())  // append messages in the message window
+#endif
+    {
+	// Reset msg_didout, so that a message that's there is overwritten.
+	msg_didout = FALSE;
+	msg_col = 0;
+    }
 
     // No need to wait after an intentional redraw.
     need_wait_return = FALSE;