add apply cursor type

make it focus the terminal when spawning
fix step in the scrollback slider
This commit is contained in:
neon443
2025-08-23 00:20:26 +01:00
parent 657bd33eef
commit a454723727
2 changed files with 8 additions and 1 deletions

View File

@@ -27,7 +27,7 @@ struct SettingsView: View {
Slider(
value: $hostsManager.settings.scrollback,
in: 100...10_000,
step: 1_000.0
step: 100
)
}

View File

@@ -30,7 +30,9 @@ final class SSHTerminalDelegate: TerminalView, Sendable, @preconcurrency Termina
}
applySelectedTheme()
applyScrollbackLength()
applyCursorType()
startFeedLoop()
self.becomeFirstResponder()
}
}
@@ -69,6 +71,11 @@ final class SSHTerminalDelegate: TerminalView, Sendable, @preconcurrency Termina
applyTheme(hostsManager.selectedTheme)
}
func applyCursorType() {
guard let hostsManager else { return }
getTerminal().setCursorStyle(hostsManager.settings.cursorType.stCursorStyle)
}
func applyTheme(_ theme: Theme) {
getTerminal().installPalette(colors: theme.ansi)
getTerminal().foregroundColor = theme.foreground