Skip to content

Commit 092ab9c

Browse files
Add comment for startOffset in layoutTextUntilLineBreak
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent eb33e4f commit 092ab9c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/CodeEditTextView/TextLine/Typesetter/Typesetter.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ final public class Typesetter {
181181
)
182182

183183
// Indicates the subrange on the range that the typesetter knows about. This may not be the entire line
184+
// Convert the absolute position to an offset relative to the typesetter's range.
184185
let startOffset = context.currentPosition - range.location
185186
let typesetSubrange = NSRange(location: startOffset, length: lineBreak - startOffset)
186187
let typesetData = typesetLine(typesetter: typesetter, range: typesetSubrange)

0 commit comments

Comments
 (0)