mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
Add assertion to computePositionOfLineAndCharacter (#17121)
This commit is contained in:
1 parent
1c93531f0f
commit
dbbf051886
2 files changed
+11
-4
No files matched your search
@@ -86,7 +86,7 @@ namespace ts.server {
|
||||
*/
|
||||
lineOffsetToPosition(line: number, offset: number): number {
|
||||
if (!this.svc) {
|
||||
return computePositionOfLineAndCharacter(this.getLineMap(), line - 1, offset - 1);
|
||||
return computePositionOfLineAndCharacter(this.getLineMap(), line - 1, offset - 1, this.text);
|
||||
}
|
||||
|
||||
// TODO: assert this offset is actually on the line
|
||||
|
||||
Reference in new issue
Block a user