add support for cursor text colors

fix no tabs being selected when opening a 2nd session 💀
This commit is contained in:
neon443
2025-09-01 22:04:23 +01:00
parent 8cc1340f3f
commit b981cc3f54
2 changed files with 3 additions and 4 deletions

View File

@@ -135,10 +135,9 @@ final class SSHTerminalDelegate: TerminalView, Sendable, @preconcurrency Termina
getTerminal().foregroundColor = theme.foreground getTerminal().foregroundColor = theme.foreground
getTerminal().backgroundColor = theme.background getTerminal().backgroundColor = theme.background
caretColor = theme.cursor.uiColor setCursorColor(source: getTerminal(), color: theme.cursor, textColor: theme.cursorText)
selectedTextBackgroundColor = theme.selection.uiColor selectedTextBackgroundColor = theme.selection.uiColor
// TODO: selectedtext color
// TODO: selectedtext and cursor colors
} }
func applyScrollbackLength() { func applyScrollbackLength() {

View File

@@ -124,7 +124,7 @@ struct ShellTabView: View {
let oneTabWidth: CGFloat = max(100, (UIScreen.main.bounds.width)/CGFloat(container.sessionIDs.count)) let oneTabWidth: CGFloat = max(100, (UIScreen.main.bounds.width)/CGFloat(container.sessionIDs.count))
HStack(spacing: 0) { HStack(spacing: 0) {
ForEach(container.sessionIDs, id: \.self) { id in 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 let thisHandler: SSHHandler = container.sessions[id]!.handler
ZStack { ZStack {
Rectangle() Rectangle()