mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 13:26:16 +00:00
updated swiftterm i think
fix scrollback preferences not being set
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user