[web] Restore terminal's echo setting after felt quits (flutter/engine#33928)

This commit is contained in:
Mouad Debbar
2022-06-09 15:08:04 -04:00
committed by GitHub
parent 1fa365a275
commit d1598e9d9d

View File

@@ -201,6 +201,12 @@ class PipelineWatcher {
io.stdin.echoMode = false;
io.stdin.lineMode = false;
// Reset these settings when the felt command is done.
cleanupCallbacks.add(() async {
io.stdin.echoMode = true;
io.stdin.lineMode = true;
});
await io.stdin.firstWhere((List<int> event) {
const int qKeyCode = 113;
final bool qEntered = event.isNotEmpty && event.first == qKeyCode;