File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ const colorMap = {
2323 'Console' : '#457abb' ,
2424 'Error' : 'red' ,
2525}
26+ // TODO: if Node's Version of VSCode >=9.9, use option `compact`
2627const inspectOptions = { maxArrayLength : null , depth : null } ;
2728
2829type Data = { line : number , type : 'Expression' | 'Terminal' , value : any } ;
Original file line number Diff line number Diff line change @@ -38,8 +38,10 @@ export default class ReplClient {
3838 this . decorator = new Decorator ( outputChannel ) ;
3939
4040 this . changeActiveDisposable = window . onDidChangeActiveTextEditor ( async ( editor ) => {
41- if ( this . editor === editor )
41+ if ( this . editor && this . editor . document === editor . document ) {
42+ this . init ( editor , editor . document ) ;
4243 this . interpret ( ) ;
44+ }
4345 } ) ;
4446
4547 this . closeTextDocumentDisposable = workspace . onDidCloseTextDocument ( async ( document ) => {
@@ -122,8 +124,6 @@ export default class ReplClient {
122124 if ( this . outputChannel )
123125 this . outputChannel . appendLine ( `Disposing REPL server.` ) ;
124126
125- this . editor = null ;
126-
127127 this . repl . send ( { operation : 'exit' } ) ;
128128 this . repl = null ;
129129 }
You can’t perform that action at this time.
0 commit comments