added resize back
This commit is contained in:
parent
8b9138119c
commit
f2e33ba8e6
@ -48,8 +48,13 @@ function TerminalComponent (p: {websocket: string|null}) {
|
||||
const socket = new WebSocket(websocket);
|
||||
|
||||
socket.addEventListener('open', () => {
|
||||
socket.send(JSON.stringify({CommandType: 'resize', Arguments: [terminal.current?.rows, terminal.current?.cols]}));
|
||||
});
|
||||
|
||||
terminal.current.onResize(({cols, rows})=>{
|
||||
socket.send(JSON.stringify({CommandType: 'resize', Arguments: [rows, cols]}));
|
||||
})
|
||||
|
||||
socket.addEventListener('message', (event) => {
|
||||
terminal.current?.write(JSON.parse(event.data));
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user