swift
0cd034f8 - [SourceKit] Map line and column using the latest snapshot

Commit
4 years ago
[SourceKit] Map line and column using the latest snapshot During a cursor info request, the resolved offset was mapped to line and column using the buffer inside `SwiftDocumentSyntaxInfo`. However, prior to 54683ca6072ee2b39e8167742840d460936debab, `editorReplaceText` was not updating the syntax info. This meant that snapshots would be more up to date than the buffer in the syntax info, allowing for the possibility of an invalid offset. While 54683ca6072ee2b39e8167742840d460936debab would also fix this, snapshots actually have a `getLineAndColumn` anyway. Use that instead of grabbing the buffer from syntax info. Resolves rdar://78161348.
Author
Committer
Parents
Loading