File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -544,8 +544,6 @@ function TerminalViewport({
544544 } ) ;
545545
546546 const applyTerminalEvent = ( event : TerminalEvent ) => {
547- const unsubscribe = api ?. terminal . onEvent ( ( event ) => {
548- if ( event . threadId !== threadId || event . terminalId !== terminalId ) return ;
549547 const activeTerminal = terminalRef . current ;
550548 if ( ! activeTerminal ) {
551549 return ;
@@ -605,6 +603,10 @@ function TerminalViewport({
605603 } , 0 ) ;
606604 }
607605 } ;
606+ const unsubscribe = api ?. terminal . onEvent ( ( event ) => {
607+ if ( event . threadId !== threadId || event . terminalId !== terminalId ) return ;
608+ applyTerminalEvent ( event ) ;
609+ } ) ;
608610 const applyPendingTerminalEvents = (
609611 terminalEventEntries : ReadonlyArray < { id : number ; event : TerminalEvent } > ,
610612 ) => {
You can’t perform that action at this time.
0 commit comments