File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1948,12 +1948,7 @@ namespace ts.server {
19481948 const change = file . changes [ i ] ;
19491949 scriptInfo . editContent ( change . span . start , change . span . start + change . span . length , change . newText ) ;
19501950 }
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 ) ;
19571952 }
19581953 }
19591954
@@ -1969,6 +1964,16 @@ namespace ts.server {
19691964 }
19701965 }
19711966
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+
19721977 private closeConfiguredProject ( configFile : NormalizedPath ) : void {
19731978 const configuredProject = this . findConfiguredProjectByProjectName ( configFile ) ;
19741979 if ( configuredProject && configuredProject . deleteOpenRef ( ) === 0 ) {
Original file line number Diff line number Diff line change @@ -1287,9 +1287,9 @@ namespace ts.server {
12871287 const end = scriptInfo . lineOffsetToPosition ( args . endLine , args . endOffset ) ;
12881288 if ( start >= 0 ) {
12891289 scriptInfo . editContent ( start , end , args . insertString ) ;
1290+ this . projectService . addChangedFile ( scriptInfo ) ;
12901291 this . changeSeq ++ ;
12911292 }
1292- this . projectService . delayUpdateProjectGraphAndInferredProjectsRefresh ( project ) ;
12931293 }
12941294 }
12951295
You can’t perform that action at this time.
0 commit comments