Skip to content

Commit f2978b0

Browse files
committed
Adjust tokenRange
1 parent a1a8755 commit f2978b0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Sources/SourceKitLSP/Swift/SwiftLanguageService.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -746,8 +746,7 @@ extension SwiftLanguageService {
746746
if let snapshot = try? await latestSnapshot(for: uri) {
747747
let tree = await syntaxTreeManager.syntaxTree(for: snapshot)
748748
if let token = tree.token(at: snapshot.absolutePosition(of: position)) {
749-
let range: Range<Position> = snapshot.absolutePositionRange(of: token.position..<token.endPosition)
750-
tokenRange = range
749+
tokenRange = snapshot.absolutePositionRange(of: token.position..<token.endPosition)
751750
}
752751
}
753752

0 commit comments

Comments
 (0)