T35: Cmd-Up and Cmd-Down, Ctrl-Shift-Up and Ctrl-Shift-Down off macOS, jump to the prompt before or after the view's top, as Ghostty jumps: the tap rewrites each OSC 133 mark in place into an OSC 8 link of the terminal's own, which the parser keeps in the prompt's cells through scroll, reflow and history, and links pass over; the tap's OSC scanner ends a body as vte does
CI / platforms (ubuntu-24.04) (push) Successful in 1m4s
CI / platforms (windows-latest) (push) Successful in 1m36s
CI / macos (push) Successful in 11m52s

This commit is contained in:
ZacharyZhang-NY committed 2026-10-16 23:46:58 -04:00
1 parent d3700f5278
commit 15e83f5b7e
13 files changed
+419 -27

No files matched your search

+15 -1
View File
@@ -12,7 +12,7 @@ use super::{
view::TerminalView,
};
actions!(elyterminal, [Find, FindNewer]);
actions!(elyterminal, [Find, FindNewer, PreviousPrompt, NextPrompt]);
/// The key context a terminal's root sets.
pub const CONTEXT: &str = "Terminal";
@@ -32,6 +32,20 @@ pub fn bind_keys(cx: &mut App) {
"ctrl-shift-f",
)
};
// Ghostty's jumps: Cmd with or without Shift on macOS, Ctrl-Shift elsewhere.
let (up, down): (&[&str], &[&str]) = if cfg!(target_os = "macos") {
(&["cmd-up", "cmd-shift-up"], &["cmd-down", "cmd-shift-down"])
} else {
(&["ctrl-shift-up"], &["ctrl-shift-down"])
};
cx.bind_keys(
up.iter()
.map(|key| KeyBinding::new(key, PreviousPrompt, Some(CONTEXT))),
);
cx.bind_keys(
down.iter()
.map(|key| KeyBinding::new(key, NextPrompt, Some(CONTEXT))),
);
cx.bind_keys([
KeyBinding::new(copy, Copy, Some(CONTEXT)),
KeyBinding::new(paste, Paste, Some(CONTEXT)),