@@ -630,7 +630,7 @@ export class LSHost implements ts.LanguageServiceHost {
630
630
}
631
631
632
632
getCurrentDirectory ( ) : string {
633
- return "" ;
633
+ return this . host . getCurrentDirectory ( ) ;
634
634
}
635
635
636
636
getScriptIsOpen ( filename : string ) {
@@ -1248,16 +1248,6 @@ export class ProjectService {
1248
1248
this . printProjects ( ) ;
1249
1249
}
1250
1250
1251
- updateConfiguredProjectList ( ) {
1252
- const configuredProjects : Project [ ] = [ ] ;
1253
- for ( let i = 0 , len = this . configuredProjects . length ; i < len ; i ++ ) {
1254
- if ( this . configuredProjects [ i ] . openRefCount > 0 ) {
1255
- configuredProjects . push ( this . configuredProjects [ i ] ) ;
1256
- }
1257
- }
1258
- this . configuredProjects = configuredProjects ;
1259
- }
1260
-
1261
1251
removeProject ( project : Project ) {
1262
1252
this . log ( "remove project: " + project . getRootFiles ( ) . toString ( ) ) ;
1263
1253
if ( project . isConfiguredProject ( ) ) {
@@ -1336,7 +1326,6 @@ export class ProjectService {
1336
1326
this . openFileRoots . push ( info ) ;
1337
1327
}
1338
1328
}
1339
- this . updateConfiguredProjectList ( ) ;
1340
1329
this . report ( "opened" , info . fileName , info . defaultProject ) ;
1341
1330
}
1342
1331
@@ -1379,7 +1368,7 @@ export class ProjectService {
1379
1368
1380
1369
this . openFileRootsConfigured = openFileRootsConfigured ;
1381
1370
}
1382
- if ( removedProject ) {
1371
+ if ( removedProject && ! removedProject . isConfiguredProject ( ) ) {
1383
1372
this . removeProject ( removedProject ) ;
1384
1373
const openFilesReferenced : ScriptInfo [ ] = [ ] ;
1385
1374
const orphanFiles : ScriptInfo [ ] = [ ] ;
@@ -1737,9 +1726,6 @@ export class ProjectService {
1737
1726
}
1738
1727
}
1739
1728
}
1740
- else {
1741
- this . updateConfiguredProject ( project ) ;
1742
- }
1743
1729
return { configFileName } ;
1744
1730
}
1745
1731
else {
0 commit comments