updated swiftterm i think

fix scrollback preferences not being set
This commit is contained in:
neon443
2025-08-22 19:39:53 +01:00
parent 6308ef1c2f
commit 9b1b04d755
5 changed files with 42 additions and 15 deletions

View File

@@ -7,10 +7,11 @@
import Foundation
import SwiftUI
import SwiftTerm
struct AppSettings: Codable, Sendable, Equatable {
var scrollback: CGFloat = 10_000
var cursorStyle: CursorStyle = .block
var cursorStyle: CursorShape = .block
var locationPersist: Bool = false
var bellSound: Bool = false
var bellHaptic: Bool = true
@@ -19,7 +20,7 @@ struct AppSettings: Codable, Sendable, Equatable {
var appIcon: AppIcon = .regular
}
enum CursorStyle: Codable, CaseIterable, Equatable, CustomStringConvertible {
enum CursorShape: Codable, CaseIterable, Equatable, CustomStringConvertible {
case block
case bar

View File

@@ -32,7 +32,7 @@ struct SettingsView: View {
}
Picker("Cursor", selection: $hostsManager.settings.cursorStyle) {
ForEach(CursorStyle.allCases, id: \.self) { type in
ForEach(CursorShape.allCases, id: \.self) { type in
Text(type.description).tag(type)
}
}

View File

@@ -29,6 +29,7 @@ final class SSHTerminalDelegate: TerminalView, Sendable, @preconcurrency Termina
font = UIFont(name: hostsManager.selectedFont, size: hostsManager.fontSize)!
}
applySelectedTheme()
applyScrollbackLength()
startFeedLoop()
}
}
@@ -92,7 +93,6 @@ final class SSHTerminalDelegate: TerminalView, Sendable, @preconcurrency Termina
public override init(frame: CGRect) {
super.init(frame: frame)
applyScrollbackLength()
terminalDelegate = self
}