File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/packages/frontend/frame-editors/terminal-editor Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ export class Terminal<T extends CodeEditorState = CodeEditorState> {
104
104
private webLinksAddon : WebLinksAddon ;
105
105
106
106
private render_done : Function [ ] = [ ] ;
107
- private ignoreData : boolean = false ;
107
+ private ignoreData : number = 0 ;
108
108
109
109
private firstOpen = true ;
110
110
@@ -407,7 +407,7 @@ export class Terminal<T extends CodeEditorState = CodeEditorState> {
407
407
) ;
408
408
}
409
409
try {
410
- this . ignoreData = true ;
410
+ this . ignoreData ++ ;
411
411
// NOTE: terminal.write takes a cb but not in the way callback expects.
412
412
// Also, terminal.write is NOT await-able
413
413
await callback ( ( cb ) => {
@@ -418,7 +418,8 @@ export class Terminal<T extends CodeEditorState = CodeEditorState> {
418
418
} catch ( err ) {
419
419
console . warn ( `issue writing data to terminal: ${ data } ` ) ;
420
420
} finally {
421
- this . ignoreData = false ;
421
+ await delay ( 0 ) ;
422
+ this . ignoreData -- ;
422
423
}
423
424
if ( this . state == "done" ) return ;
424
425
// tell anyone who waited for output coming back about this
You can’t perform that action at this time.
0 commit comments