summaryrefslogtreecommitdiffstats
path: root/smenu.c
diff options
context:
space:
mode:
Diffstat (limited to 'smenu.c')
-rw-r--r--smenu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/smenu.c b/smenu.c
index 0dc7860..1abc9e5 100644
--- a/smenu.c
+++ b/smenu.c
@@ -2427,9 +2427,9 @@ get_scancode(unsigned char * s, size_t max)
size_t i = 1;
struct termios original_ts, nowait_ts;
- /* Flush non-transmitted, non-read input data. */
- /* """"""""""""""""""""""""""""""""""""""""""" */
- tcflush(0, TCIFLUSH);
+ /* Wait until all data has been transmitted to stdin. */
+ /* """""""""""""""""""""""""""""""""""""""""""""""""" */
+ tcdrain(0);
if ((c = my_fgetc(stdin)) == EOF)
return 0;