From a3a7eb3563bba2c123f873f4f7a97506fa741c1c Mon Sep 17 00:00:00 2001 From: Vitalii Kotivskyi Date: Tue, 26 Nov 2024 12:53:53 +0100 Subject: [PATCH] Made options and setup methods public, so terminal options can be customized - scrollback now can be changed --- Sources/SwiftTerm/Terminal.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Sources/SwiftTerm/Terminal.swift b/Sources/SwiftTerm/Terminal.swift index 9112543c..69843517 100644 --- a/Sources/SwiftTerm/Terminal.swift +++ b/Sources/SwiftTerm/Terminal.swift @@ -274,7 +274,10 @@ open class Terminal { /// The current terminal rows (counting from 1) public private(set) var rows: Int = 25 var tabStopWidth : Int = 8 - var options: TerminalOptions + + /// Terminal configuration options. + /// Setup(isReset:) method should be called to apply changes + public var options: TerminalOptions // The current buffers var buffers : BufferSet! @@ -603,7 +606,7 @@ open class Terminal { return getCharData(col: col, row: row)?.getCharacter() } - func setup (isReset: Bool = false) + public func setup (isReset: Bool = false) { // Sadly a duplicate of much of what lives in init() due to Swift not allowing me to // call this