Skip to content

Commit d9eb63b

Browse files
committed
Remove hostCache.getChangeRange
1 parent c37060a commit d9eb63b

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/services/services.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1535,16 +1535,6 @@ module ts {
15351535
var file = this.getEntry(fileName);
15361536
return file && file.scriptSnapshot;
15371537
}
1538-
1539-
public getChangeRange(fileName: string, lastKnownVersion: string, oldScriptSnapshot: IScriptSnapshot): TextChangeRange {
1540-
var currentVersion = this.getVersion(fileName);
1541-
if (lastKnownVersion === currentVersion) {
1542-
return unchangedTextChangeRange; // "No changes"
1543-
}
1544-
1545-
var scriptSnapshot = this.getScriptSnapshot(fileName);
1546-
return scriptSnapshot.getChangeRange(oldScriptSnapshot);
1547-
}
15481538
}
15491539

15501540
class SyntaxTreeCache {
@@ -2062,7 +2052,7 @@ module ts {
20622052
}
20632053

20642054
// We have an older version of the sourceFile, incrementally parse the changes
2065-
var textChangeRange = hostCache.getChangeRange(fileName, oldSourceFile.version, oldSourceFile.scriptSnapshot);
2055+
var textChangeRange = hostFileInformation.scriptSnapshot.getChangeRange(oldSourceFile.scriptSnapshot);
20662056
return documentRegistry.updateDocument(oldSourceFile, fileName, newSettings, hostFileInformation.scriptSnapshot, hostFileInformation.version, textChangeRange);
20672057
}
20682058
}

0 commit comments

Comments
 (0)