We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b5c4f8a commit da173aeCopy full SHA for da173ae
1 file changed
Sources/CodeEditSourceEditor/Minimap/MinimapLineRenderer.swift
@@ -61,6 +61,7 @@ final class MinimapLineRenderer: TextLayoutManagerRenderDelegate {
61
}
62
63
func characterXPosition(in lineFragment: LineFragment, for offset: Int) -> CGFloat {
64
- 8 + (CGFloat(offset) * 1.5)
+ // Offset is relative to the whole line, the CTLine is too.
65
+ return 8 + (CGFloat(offset - CTLineGetStringRange(lineFragment.ctLine).location) * 1.5)
66
67
0 commit comments