Fix clearScreen/clearScrollback for split panes and update all help text

- Fixed Cmd+K crash by handling both tab and split pane modes
- Updated startup message to show Cmd+I for AI (not Cmd+K)
- clearScreen and clearScrollback now work with active pane
- All documentation now consistent with correct shortcuts
This commit is contained in:
2026-02-01 00:00:32 +00:00
parent 1a8f23fcb1
commit 09f90a736a
5 changed files with 29 additions and 14 deletions

BIN
.DS_Store vendored

Binary file not shown.

Binary file not shown.

View File

@@ -533,14 +533,29 @@ class MainWindowController: NSWindowController {
} }
@objc func clearScreen() { @objc func clearScreen() {
if let session = tabManager.getCurrentSession() { // If in split pane mode, clear the active pane
if panes.count > 0 && activePaneIndex < panes.count {
let session = panes[activePaneIndex]
session.textView.string = ""
session.showPrompt()
} else if let session = tabManager.getCurrentSession() {
// Otherwise clear the current tab
session.textView.string = "" session.textView.string = ""
session.showPrompt() session.showPrompt()
} }
} }
@objc func clearScrollback() { @objc func clearScrollback() {
if let session = tabManager.getCurrentSession() { // Get the active session (either from pane or tab)
let session: TerminalSession?
if panes.count > 0 && activePaneIndex < panes.count {
session = panes[activePaneIndex]
} else {
session = tabManager.getCurrentSession()
}
guard let activeSession = session else { return }
let alert = NSAlert() let alert = NSAlert()
alert.messageText = "Clear Scrollback?" alert.messageText = "Clear Scrollback?"
alert.informativeText = "This will clear all terminal output history." alert.informativeText = "This will clear all terminal output history."
@@ -549,9 +564,8 @@ class MainWindowController: NSWindowController {
alert.alertStyle = .warning alert.alertStyle = .warning
if alert.runModal() == .alertFirstButtonReturn { if alert.runModal() == .alertFirstButtonReturn {
session.textView.string = "" activeSession.textView.string = ""
session.showPrompt() activeSession.showPrompt()
}
} }
} }

View File

@@ -200,8 +200,9 @@ class TerminalSession: NSObject, NSTextViewDelegate, NSMenuDelegate {
appendText("Features:\n") appendText("Features:\n")
appendText(" • Cmd+T: New tab\n") appendText(" • Cmd+T: New tab\n")
appendText(" • Cmd+R: Search history (fuzzy search)\n") appendText(" • Cmd+R: Search history (fuzzy search)\n")
appendText(" • Cmd+K: AI command generator\n") appendText(" • Cmd+I: AI command generator\n")
appendText(" • Cmd+P: Command snippets\n") appendText(" • Cmd+P: Command snippets\n")
appendText(" • Cmd+K: Clear screen\n")
appendText(" • Tab: Accept auto-suggestion\n") appendText(" • Tab: Accept auto-suggestion\n")
appendText(" • Type 'help' for more commands\n") appendText(" • Type 'help' for more commands\n")
appendText("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n") appendText("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n")