File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -1948,12 +1948,7 @@ namespace ts.server {
1948
1948
const change = file . changes [ i ] ;
1949
1949
scriptInfo . editContent ( change . span . start , change . span . start + change . span . length , change . newText ) ;
1950
1950
}
1951
- if ( ! this . changedFiles ) {
1952
- this . changedFiles = [ scriptInfo ] ;
1953
- }
1954
- else if ( ! contains ( this . changedFiles , scriptInfo ) ) {
1955
- this . changedFiles . push ( scriptInfo ) ;
1956
- }
1951
+ this . addChangedFile ( scriptInfo ) ;
1957
1952
}
1958
1953
}
1959
1954
@@ -1969,6 +1964,16 @@ namespace ts.server {
1969
1964
}
1970
1965
}
1971
1966
1967
+ /* @internal */
1968
+ addChangedFile ( scriptInfo : ScriptInfo ) {
1969
+ if ( ! this . changedFiles ) {
1970
+ this . changedFiles = [ scriptInfo ] ;
1971
+ }
1972
+ else if ( ! contains ( this . changedFiles , scriptInfo ) ) {
1973
+ this . changedFiles . push ( scriptInfo ) ;
1974
+ }
1975
+ }
1976
+
1972
1977
private closeConfiguredProject ( configFile : NormalizedPath ) : void {
1973
1978
const configuredProject = this . findConfiguredProjectByProjectName ( configFile ) ;
1974
1979
if ( configuredProject && configuredProject . deleteOpenRef ( ) === 0 ) {
Original file line number Diff line number Diff line change @@ -1287,9 +1287,9 @@ namespace ts.server {
1287
1287
const end = scriptInfo . lineOffsetToPosition ( args . endLine , args . endOffset ) ;
1288
1288
if ( start >= 0 ) {
1289
1289
scriptInfo . editContent ( start , end , args . insertString ) ;
1290
+ this . projectService . addChangedFile ( scriptInfo ) ;
1290
1291
this . changeSeq ++ ;
1291
1292
}
1292
- this . projectService . delayUpdateProjectGraphAndInferredProjectsRefresh ( project ) ;
1293
1293
}
1294
1294
}
1295
1295
You can’t perform that action at this time.
0 commit comments