Browse Source

Prevents echoing text at the terminal when leaving the app due to escape sequences.

BDisp 2 years ago
parent
commit
72d5787b69
1 changed files with 5 additions and 0 deletions
  1. 5 0
      Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs

+ 5 - 0
Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs

@@ -160,6 +160,11 @@ namespace Terminal.Gui {
 			StopReportingMouseMoves ();
 			SetCursorVisibility (CursorVisibility.Default);
 
+			var code = Curses.get_wch (out _);
+			while (code != -1) {
+				code = Curses.get_wch (out _);
+			}
+
 			Curses.endwin ();
 		}