File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
html/src/components/terminal/xterm Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ export class Xterm {
101101 private reconnect = true ;
102102 private doReconnect = true ;
103103 private closeOnDisconnect = false ;
104+ private preferencesApplied = false ;
104105
105106 private writeFunc = ( data : ArrayBuffer ) => this . writeData ( new Uint8Array ( data ) ) ;
106107
@@ -166,7 +167,6 @@ export class Xterm {
166167 terminal . loadAddon ( webLinksAddon ) ;
167168
168169 terminal . open ( parent ) ;
169- fitAddon . fit ( ) ;
170170 }
171171
172172 @bind
@@ -466,6 +466,14 @@ export class Xterm {
466466 break ;
467467 }
468468 }
469+
470+ if ( ! this . preferencesApplied ) {
471+ this . preferencesApplied = true ;
472+
473+ requestAnimationFrame ( ( ) => {
474+ fitAddon . fit ( ) ;
475+ } ) ;
476+ }
469477 }
470478
471479 @bind
You can’t perform that action at this time.
0 commit comments