From b981cc3f54434e7269a57b1c393d2507b2711a41 Mon Sep 17 00:00:00 2001 From: neon443 <69979447+neon443@users.noreply.github.com> Date: Mon, 1 Sep 2025 22:04:23 +0100 Subject: [PATCH] =?UTF-8?q?add=20support=20for=20cursor=20text=20colors=20?= =?UTF-8?q?fix=20no=20tabs=20being=20selected=20when=20opening=20a=202nd?= =?UTF-8?q?=20session=20=F0=9F=92=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ShhShell/Terminal/SSHTerminalDelegate.swift | 5 ++--- ShhShell/Views/Terminal/ShellTabView.swift | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ShhShell/Terminal/SSHTerminalDelegate.swift b/ShhShell/Terminal/SSHTerminalDelegate.swift index d92a60d..24af308 100644 --- a/ShhShell/Terminal/SSHTerminalDelegate.swift +++ b/ShhShell/Terminal/SSHTerminalDelegate.swift @@ -135,10 +135,9 @@ final class SSHTerminalDelegate: TerminalView, Sendable, @preconcurrency Termina getTerminal().foregroundColor = theme.foreground getTerminal().backgroundColor = theme.background - caretColor = theme.cursor.uiColor + setCursorColor(source: getTerminal(), color: theme.cursor, textColor: theme.cursorText) selectedTextBackgroundColor = theme.selection.uiColor - - // TODO: selectedtext and cursor colors + // TODO: selectedtext color } func applyScrollbackLength() { diff --git a/ShhShell/Views/Terminal/ShellTabView.swift b/ShhShell/Views/Terminal/ShellTabView.swift index c75f24f..3637106 100644 --- a/ShhShell/Views/Terminal/ShellTabView.swift +++ b/ShhShell/Views/Terminal/ShellTabView.swift @@ -124,7 +124,7 @@ struct ShellTabView: View { let oneTabWidth: CGFloat = max(100, (UIScreen.main.bounds.width)/CGFloat(container.sessionIDs.count)) HStack(spacing: 0) { ForEach(container.sessionIDs, id: \.self) { id in - let selected: Bool = selectedID == id + let selected: Bool = selectedID == id || (selectedID == nil && handler.sessionID == id) let thisHandler: SSHHandler = container.sessions[id]!.handler ZStack { Rectangle()