File tree 1 file changed +10
-1
lines changed
packages/protocol/src/browser/modules
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ interface ClientNodePtyProcessProxy extends NodePtyProcessProxy, ClientServerPro
9
9
export class NodePtyProcess extends ClientProxy < ClientNodePtyProcessProxy > implements pty . IPty {
10
10
private _pid = - 1 ;
11
11
private _process = "" ;
12
+ private lastCols : number | undefined ;
13
+ private lastRows : number | undefined ;
12
14
13
15
public constructor (
14
16
private readonly moduleProxy : ClientNodePtyModuleProxy ,
@@ -37,6 +39,9 @@ export class NodePtyProcess extends ClientProxy<ClientNodePtyProcessProxy> imple
37
39
}
38
40
39
41
public resize ( columns : number , rows : number ) : void {
42
+ this . lastCols = columns ;
43
+ this . lastRows = rows ;
44
+
40
45
this . catch ( this . proxy . resize ( columns , rows ) ) ;
41
46
}
42
47
@@ -51,7 +56,11 @@ export class NodePtyProcess extends ClientProxy<ClientNodePtyProcessProxy> imple
51
56
protected handleDisconnect ( ) : void {
52
57
this . _process += " (disconnected)" ;
53
58
this . emit ( "data" , "\r\n\nLost connection...\r\n\n" ) ;
54
- this . initialize ( this . moduleProxy . spawn ( this . file , this . args , this . options ) ) ;
59
+ this . initialize ( this . moduleProxy . spawn ( this . file , this . args , {
60
+ ...this . options ,
61
+ cols : this . lastCols || this . options . cols ,
62
+ rows : this . lastRows || this . options . rows ,
63
+ } ) ) ;
55
64
}
56
65
}
57
66
You can’t perform that action at this time.
0 commit comments