File tree 1 file changed +8
-6
lines changed
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -1116,13 +1116,15 @@ namespace ts.server {
1116
1116
else {
1117
1117
// if the root file was opened by client, it would belong to either
1118
1118
// openFileRoots or openFileReferenced.
1119
- if ( this . openFileRoots . indexOf ( info ) >= 0 ) {
1120
- this . openFileRoots = copyListRemovingItem ( info , this . openFileRoots ) ;
1119
+ if ( info . isOpen ) {
1120
+ if ( this . openFileRoots . indexOf ( info ) >= 0 ) {
1121
+ this . openFileRoots = copyListRemovingItem ( info , this . openFileRoots ) ;
1122
+ }
1123
+ if ( this . openFilesReferenced . indexOf ( info ) >= 0 ) {
1124
+ this . openFilesReferenced = copyListRemovingItem ( info , this . openFilesReferenced ) ;
1125
+ }
1126
+ this . openFileRootsConfigured . push ( info ) ;
1121
1127
}
1122
- if ( this . openFilesReferenced . indexOf ( info ) >= 0 ) {
1123
- this . openFilesReferenced = copyListRemovingItem ( info , this . openFilesReferenced ) ;
1124
- }
1125
- this . openFileRootsConfigured . push ( info ) ;
1126
1128
}
1127
1129
project . addRoot ( info ) ;
1128
1130
}
You can’t perform that action at this time.
0 commit comments