patch 8.1.0349: crash when wiping buffer in a callback
Problem: Crash when wiping buffer in a callback.
Solution: Do not handle messages when only peeking for a character.
(closes #2107) Add "redraw_flag" to test_override().
diff --git a/src/screen.c b/src/screen.c
index 743c321..c9f9410 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -10819,8 +10819,11 @@
return 0;
else
#endif
- return (!RedrawingDisabled
- && !(p_lz && char_avail() && !KeyTyped && !do_redraw));
+ return ((!RedrawingDisabled
+#ifdef FEAT_EVAL
+ || ignore_redraw_flag_for_testing
+#endif
+ ) && !(p_lz && char_avail() && !KeyTyped && !do_redraw));
}
/*