import AppKit struct LocationStrategyHelper { /// `lineNumber` is 0-based /// /// - Parameters: /// - length: If specified, use this length instead of the actual line length. Useful when you want to get the exact line height and y that ignores the unwrappded lines. static func getLineFrame( _ lineNumber: Int, in editor: AXUIElement, with lines: [String], length: Int? = nil ) -> CGRect? { guard editor.isNonNavigatorSourceEditor, lineNumber < lines.count && lineNumber >= 0 else { return nil } var characterPosition = 0 for i in 0..