diff options
| author | kangal-bot <kangal@herdr.dev> | 2026-05-18 20:13:19 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-18 20:13:19 +0300 |
| commit | fa0e380e627644f269cfbd0ed4cf79f15ff74176 (patch) | |
| tree | c231d9801bef7830ec5600a4a538771d34960562 /src/pane | |
| parent | f33e1a0faae5e0ecbfd9653f9635d83793c98b95 (diff) | |
fix: preserve alt backspace in panes (#165)
refs #155
Co-authored-by: kangal-bot <kangal-bot@users.noreply.github.com>
Diffstat (limited to 'src/pane')
| -rw-r--r-- | src/pane/terminal.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/pane/terminal.rs b/src/pane/terminal.rs index efe9c7ce..fcbedeff 100644 --- a/src/pane/terminal.rs +++ b/src/pane/terminal.rs @@ -1503,6 +1503,20 @@ mod tests { } #[test] + fn ghostty_kitty_pane_encodes_parsed_legacy_alt_backspace_as_csi_u() { + let (tx, _rx) = mpsc::channel(4); + let terminal = crate::ghostty::Terminal::new(80, 24, 0).unwrap(); + let pane = GhosttyPaneTerminal::new(terminal, tx.clone()).unwrap(); + let pane_id = PaneId::from_raw(1); + pane.process_pty_bytes(pane_id, 0, b"\x1b[>1u", &tx); + + let key = crate::input::parse_terminal_key_sequence("\x1b\x7f").unwrap(); + let encoded = pane.encode_terminal_key(key, crate::input::KeyboardProtocol::Legacy); + + assert_eq!(encoded, b"\x1b[127;3u"); + } + + #[test] fn ghostty_key_encoders_are_isolated_per_pane() { let (tx, _rx) = mpsc::channel(4); let first = GhosttyPaneTerminal::new( |
