mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-21 03:21:11 -07:00
Fix issues where escape codes could end up on startup in the input prompt (#7267)
This commit is contained in:
@@ -115,7 +115,10 @@ export function KeypressProvider({
|
||||
}
|
||||
};
|
||||
|
||||
setRawMode(true);
|
||||
const wasRaw = stdin.isRaw;
|
||||
if (wasRaw === false) {
|
||||
setRawMode(true);
|
||||
}
|
||||
|
||||
const keypressStream = new PassThrough();
|
||||
let usePassthrough = false;
|
||||
@@ -677,7 +680,9 @@ export function KeypressProvider({
|
||||
rl.close();
|
||||
|
||||
// Restore the terminal to its original state.
|
||||
setRawMode(false);
|
||||
if (wasRaw === false) {
|
||||
setRawMode(false);
|
||||
}
|
||||
|
||||
if (backslashTimeout) {
|
||||
clearTimeout(backslashTimeout);
|
||||
|
||||
Reference in New Issue
Block a user