File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
packages/protocol/src/browser/modules Expand file tree Collapse file tree 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
99export class NodePtyProcess extends ClientProxy < ClientNodePtyProcessProxy > implements pty . IPty {
1010 private _pid = - 1 ;
1111 private _process = "" ;
12+ private lastCols : number | undefined ;
13+ private lastRows : number | undefined ;
1214
1315 public constructor (
1416 private readonly moduleProxy : ClientNodePtyModuleProxy ,
@@ -37,6 +39,9 @@ export class NodePtyProcess extends ClientProxy<ClientNodePtyProcessProxy> imple
3739 }
3840
3941 public resize ( columns : number , rows : number ) : void {
42+ this . lastCols = columns ;
43+ this . lastRows = rows ;
44+
4045 this . catch ( this . proxy . resize ( columns , rows ) ) ;
4146 }
4247
@@ -51,7 +56,11 @@ export class NodePtyProcess extends ClientProxy<ClientNodePtyProcessProxy> imple
5156 protected handleDisconnect ( ) : void {
5257 this . _process += " (disconnected)" ;
5358 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+ } ) ) ;
5564 }
5665}
5766
You can’t perform that action at this time.
0 commit comments