bug fix
This commit is contained in:
@@ -227,11 +227,11 @@ export default class App extends PureComponent<Props, State> {
|
||||
// The buffered text is preserved for REPL.tsx via consumeEarlyInput().
|
||||
stopCapturingEarlyInput();
|
||||
stdin.ref();
|
||||
// Windows consoles can leave stdin paused even after raw mode is set.
|
||||
// Explicitly resuming keeps `readable` events flowing cross-platform.
|
||||
stdin.resume();
|
||||
stdin.setRawMode(true);
|
||||
stdin.addListener('readable', this.handleReadable);
|
||||
// Windows consoles can leave stdin paused even after raw mode is set.
|
||||
// Resume after attaching the listener so input doesn't wake up early.
|
||||
stdin.resume();
|
||||
// Enable bracketed paste mode
|
||||
this.props.stdout.write(EBP);
|
||||
// Enable terminal focus reporting (DECSET 1004)
|
||||
|
||||
@@ -48,7 +48,6 @@ export function startCapturingEarlyInput(): void {
|
||||
process.stdin.setEncoding('utf8')
|
||||
process.stdin.setRawMode(true)
|
||||
process.stdin.ref()
|
||||
process.stdin.resume()
|
||||
|
||||
readableHandler = () => {
|
||||
let chunk = process.stdin.read()
|
||||
@@ -61,6 +60,7 @@ export function startCapturingEarlyInput(): void {
|
||||
}
|
||||
|
||||
process.stdin.on('readable', readableHandler)
|
||||
process.stdin.resume()
|
||||
} catch {
|
||||
// If we can't set raw mode, just silently continue without early capture
|
||||
isCapturing = false
|
||||
|
||||
Reference in New Issue
Block a user