From 3308163d35d5c5f2076c6cea6d5e4031f0b3522d Mon Sep 17 00:00:00 2001 From: MehdiG44 Date: Sun, 22 Feb 2026 14:42:10 +0000 Subject: [PATCH] Make cellDimension, CellDimension typealias, and BufferLine.isWrapped public These properties are needed by consumers for: - cellDimension: Converting tap coordinates to terminal row/column - isWrapped: Detecting soft-wrapped lines for URL detection across line breaks Co-Authored-By: Claude Opus 4.6 --- Sources/SwiftTerm/Apple/AppleTerminalView.swift | 2 +- Sources/SwiftTerm/BufferLine.swift | 2 +- Sources/SwiftTerm/iOS/iOSTerminalView.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/SwiftTerm/Apple/AppleTerminalView.swift b/Sources/SwiftTerm/Apple/AppleTerminalView.swift index d2c1e30bc..dba789e37 100644 --- a/Sources/SwiftTerm/Apple/AppleTerminalView.swift +++ b/Sources/SwiftTerm/Apple/AppleTerminalView.swift @@ -57,7 +57,7 @@ struct ViewLineInfo { } extension TerminalView { - typealias CellDimension = CGSize + public typealias CellDimension = CGSize func resetCaches () { diff --git a/Sources/SwiftTerm/BufferLine.swift b/Sources/SwiftTerm/BufferLine.swift index badd97994..ec69d4e9c 100644 --- a/Sources/SwiftTerm/BufferLine.swift +++ b/Sources/SwiftTerm/BufferLine.swift @@ -21,7 +21,7 @@ public final class BufferLine: CustomDebugStringConvertible { /// Renders the bottom of a character, using two cells case doubledDown } - var isWrapped: Bool + public var isWrapped: Bool var renderMode: RenderLineMode = .single private var data: UnsafeMutableBufferPointer private var dataSize: Int diff --git a/Sources/SwiftTerm/iOS/iOSTerminalView.swift b/Sources/SwiftTerm/iOS/iOSTerminalView.swift index d1856b587..293dd3303 100644 --- a/Sources/SwiftTerm/iOS/iOSTerminalView.swift +++ b/Sources/SwiftTerm/iOS/iOSTerminalView.swift @@ -155,7 +155,7 @@ open class TerminalView: UIScrollView, UITextInputTraits, UIKeyInput, UIScrollVi var search: SearchService! var debug: UIView? var pendingDisplay: Bool = false - var cellDimension: CellDimension! + public var cellDimension: CellDimension! var caretView: CaretView? var terminal: Terminal! private var progressBarView: TerminalProgressBarView?