2
0
Эх сурвалжийг харах

Use Curses.flushinp to throws away any typeahead.

BDisp 2 жил өмнө
parent
commit
281f470aa4

+ 3 - 4
Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs

@@ -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 ();
 		}