patch 8.1.0822: peeking and flushing output slows down execution

Problem:    Peeking and flushing output slows down execution.
Solution:   Do not update the mode message when global_busy is set.  Do not
            flush when only peeking for a character. (Ken Takata)
diff --git a/src/getchar.c b/src/getchar.c
index ff1b06b..fe74dbf 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -3039,9 +3039,10 @@
 
 	/*
 	 * Always flush the output characters when getting input characters
-	 * from the user.
+	 * from the user and not just peeking.
 	 */
-	out_flush();
+	if (wait_time == -1L || wait_time > 10L)
+	    out_flush();
 
 	/*
 	 * Fill up to a third of the buffer, because each character may be