mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix freeze after closing terminal on windows
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
889a4d5080
commit
f1cce7ccaa
@ -158,6 +158,8 @@ export abstract class ShellSession {
|
|||||||
cwd,
|
cwd,
|
||||||
env,
|
env,
|
||||||
name: "xterm-256color",
|
name: "xterm-256color",
|
||||||
|
// TODO: Something else is broken here so we need to force the use of winPty on windows
|
||||||
|
useConpty: false,
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -144,14 +144,6 @@ export class TerminalApi extends WebSocketApi<TerminalEvents> {
|
|||||||
this.socket.binaryType = "arraybuffer";
|
this.socket.binaryType = "arraybuffer";
|
||||||
}
|
}
|
||||||
|
|
||||||
destroy() {
|
|
||||||
if (!this.socket) return;
|
|
||||||
const controlCode = String.fromCharCode(4); // ctrl+d
|
|
||||||
|
|
||||||
this.sendMessage({ type: TerminalChannels.STDIN, data: controlCode });
|
|
||||||
setTimeout(() => super.destroy(), 2000);
|
|
||||||
}
|
|
||||||
|
|
||||||
reconnect() {
|
reconnect() {
|
||||||
super.reconnect();
|
super.reconnect();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user