Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ final public class Typesetter {
)

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

// The typesetter won't tell us if 0 characters can fit in the constrained space. This checks to
Expand Down