From 9b1b04d75550299d03e9dfd6ff70da5b5aa71ddb Mon Sep 17 00:00:00 2001 From: neon443 <69979447+neon443@users.noreply.github.com> Date: Fri, 22 Aug 2025 19:39:53 +0100 Subject: [PATCH] updated swiftterm i think fix scrollback preferences not being set --- ShhShell.xcodeproj/project.pbxproj | 18 +++++------ .../xcshareddata/swiftpm/Package.resolved | 30 +++++++++++++++++-- ShhShell/Settings/AppSettings.swift | 5 ++-- ShhShell/Views/Settings/SettingsView.swift | 2 +- .../Views/Terminal/SSHTerminalDelegate.swift | 2 +- 5 files changed, 42 insertions(+), 15 deletions(-) diff --git a/ShhShell.xcodeproj/project.pbxproj b/ShhShell.xcodeproj/project.pbxproj index 6de2772..4037ad6 100644 --- a/ShhShell.xcodeproj/project.pbxproj +++ b/ShhShell.xcodeproj/project.pbxproj @@ -78,7 +78,6 @@ A98554632E0587DF009051BD /* HostsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A98554622E0587DF009051BD /* HostsView.swift */; }; A98CAB442E4229F7005E4C42 /* HostSymbolPicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = A98CAB432E4229F7005E4C42 /* HostSymbolPicker.swift */; }; A9A2F4F62E3001D300D0AE9B /* AddSnippetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9A2F4F52E3001D300D0AE9B /* AddSnippetView.swift */; }; - A9A587202E0BF220006B31E6 /* SwiftTerm in Frameworks */ = {isa = PBXBuildFile; productRef = A9A5871F2E0BF220006B31E6 /* SwiftTerm */; }; A9BA1D192E1D9AE1005BDCEF /* SwiftTerm.Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9BA1D182E1D9AE1005BDCEF /* SwiftTerm.Color.swift */; }; A9BA1D1E2E1EAD51005BDCEF /* SF-Mono-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = A9BA1D1C2E1EAD51005BDCEF /* SF-Mono-Bold.otf */; }; A9BA1D1F2E1EAD51005BDCEF /* SF-Mono-BoldItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = A9BA1D1D2E1EAD51005BDCEF /* SF-Mono-BoldItalic.otf */; }; @@ -94,6 +93,7 @@ A9D819312E102D8700442D38 /* HostkeysView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9D819302E102D8700442D38 /* HostkeysView.swift */; }; A9DA97712E0D30ED00142DDC /* HostSymbol.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9DA97702E0D30ED00142DDC /* HostSymbol.swift */; }; A9DA97732E0D40C100142DDC /* HostSymbolPreview.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9DA97722E0D40C100142DDC /* HostSymbolPreview.swift */; }; + A9E78F422E58BD770079F3CC /* SwiftTerm in Frameworks */ = {isa = PBXBuildFile; productRef = A9E78F412E58BD770079F3CC /* SwiftTerm */; }; A9FD37552E143D23005319A8 /* SecKeyConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9FD37542E143D23005319A8 /* SecKeyConvertible.swift */; }; A9FD37572E143D5A005319A8 /* SecKeyStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9FD37562E143D5A005319A8 /* SecKeyStore.swift */; }; A9FD37592E143D74005319A8 /* GenericPasswordConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9FD37582E143D74005319A8 /* GenericPasswordConvertible.swift */; }; @@ -247,7 +247,7 @@ buildActionMask = 2147483647; files = ( A95FAA542DF4B62900DE2F5A /* LibSSH.xcframework in Frameworks */, - A9A587202E0BF220006B31E6 /* SwiftTerm in Frameworks */, + A9E78F422E58BD770079F3CC /* SwiftTerm in Frameworks */, A93143BE2DF4D0B300FCD5DB /* libpthread.tbd in Frameworks */, A9083E402DF2226F0042906E /* libz.tbd in Frameworks */, A95FAA562DF4B62A00DE2F5A /* openssl.xcframework in Frameworks */, @@ -660,7 +660,7 @@ ); name = ShhShell; packageProductDependencies = ( - A9A5871F2E0BF220006B31E6 /* SwiftTerm */, + A9E78F412E58BD770079F3CC /* SwiftTerm */, ); productName = ShhShell; productReference = A925389A2DEE06DC007E0A18 /* ShhShell.app */; @@ -740,7 +740,7 @@ mainGroup = A92538912DEE06DC007E0A18; minimizedProjectReferenceProxies = 1; packageReferences = ( - A9A5871E2E0BF220006B31E6 /* XCRemoteSwiftPackageReference "SwiftTerm" */, + A9E78F402E58BD770079F3CC /* XCRemoteSwiftPackageReference "SwiftTerm" */, ); productRefGroup = A925389B2DEE06DC007E0A18 /* Products */; projectDirPath = ""; @@ -1221,20 +1221,20 @@ /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ - A9A5871E2E0BF220006B31E6 /* XCRemoteSwiftPackageReference "SwiftTerm" */ = { + A9E78F402E58BD770079F3CC /* XCRemoteSwiftPackageReference "SwiftTerm" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/migueldeicaza/SwiftTerm"; requirement = { - branch = main; - kind = branch; + kind = revision; + revision = b48ebbbffee544df3f5dc8f43258f44f95d75c6f; }; }; /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ - A9A5871F2E0BF220006B31E6 /* SwiftTerm */ = { + A9E78F412E58BD770079F3CC /* SwiftTerm */ = { isa = XCSwiftPackageProductDependency; - package = A9A5871E2E0BF220006B31E6 /* XCRemoteSwiftPackageReference "SwiftTerm" */; + package = A9E78F402E58BD770079F3CC /* XCRemoteSwiftPackageReference "SwiftTerm" */; productName = SwiftTerm; }; /* End XCSwiftPackageProductDependency section */ diff --git a/ShhShell.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ShhShell.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index dd1e784..755a29f 100644 --- a/ShhShell.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ShhShell.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,13 +1,39 @@ { "originHash" : "4d9d9af82f23f3c708bdd502fed3939413b4f2a95a79ae568364cc92bca1527e", "pins" : [ + { + "identity" : "swift-argument-parser", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-argument-parser", + "state" : { + "revision" : "309a47b2b1d9b5e991f36961c983ecec72275be3", + "version" : "1.6.1" + } + }, + { + "identity" : "swift-subprocess", + "kind" : "remoteSourceControl", + "location" : "https://github.com/swiftlang/swift-subprocess", + "state" : { + "branch" : "main", + "revision" : "7dc6e548114db7d6b10fddf29bcd5215c3875891" + } + }, + { + "identity" : "swift-system", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-system", + "state" : { + "revision" : "61e4ca4b81b9e09e2ec863b00c340eb13497dac6", + "version" : "1.5.0" + } + }, { "identity" : "swiftterm", "kind" : "remoteSourceControl", "location" : "https://github.com/migueldeicaza/SwiftTerm", "state" : { - "branch" : "main", - "revision" : "18b1ad0b8af10c4cfac5da599edbe1c67af95413" + "revision" : "b48ebbbffee544df3f5dc8f43258f44f95d75c6f" } } ], diff --git a/ShhShell/Settings/AppSettings.swift b/ShhShell/Settings/AppSettings.swift index a0033f6..2071433 100644 --- a/ShhShell/Settings/AppSettings.swift +++ b/ShhShell/Settings/AppSettings.swift @@ -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 diff --git a/ShhShell/Views/Settings/SettingsView.swift b/ShhShell/Views/Settings/SettingsView.swift index dc8bc87..efdd814 100644 --- a/ShhShell/Views/Settings/SettingsView.swift +++ b/ShhShell/Views/Settings/SettingsView.swift @@ -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) } } diff --git a/ShhShell/Views/Terminal/SSHTerminalDelegate.swift b/ShhShell/Views/Terminal/SSHTerminalDelegate.swift index d05aab7..9a309bc 100644 --- a/ShhShell/Views/Terminal/SSHTerminalDelegate.swift +++ b/ShhShell/Views/Terminal/SSHTerminalDelegate.swift @@ -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 }