mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Use Curses.flushinp to throws away any typeahead.
This commit is contained in:
@@ -160,10 +160,9 @@ namespace Terminal.Gui {
|
||||
StopReportingMouseMoves ();
|
||||
SetCursorVisibility (CursorVisibility.Default);
|
||||
|
||||
var code = Curses.get_wch (out _);
|
||||
while (code != -1) {
|
||||
code = Curses.get_wch (out _);
|
||||
}
|
||||
// throws away any typeahead that has been typed by
|
||||
// the user and has not yet been read by the program.
|
||||
Curses.flushinp ();
|
||||
|
||||
Curses.endwin ();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user