浏览代码

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

BDisp 2 年之前
父节点
当前提交
72d5787b69
共有 1 个文件被更改,包括 5 次插入0 次删除
  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 ();
 		}