diff options
| author | akbash <akbash@herdr.dev> | 2026-08-08 02:15:56 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-08 02:15:56 +0300 |
| commit | 6f311498aeeb27c0973781961ef94e8d0016ed17 (patch) | |
| tree | 7aee2363b21b830fdbcf8dca9a7eda57a3393fb5 /src/protocol | |
| parent | 50ddc06f00ec69ede35fd5488a260dec2b74e98a (diff) | |
fix: forward pane terminal bells (#2498)
refs #2453
Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com>
Diffstat (limited to 'src/protocol')
| -rw-r--r-- | src/protocol/wire.rs | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/protocol/wire.rs b/src/protocol/wire.rs index 655f47cb..4af2c794 100644 --- a/src/protocol/wire.rs +++ b/src/protocol/wire.rs @@ -13,7 +13,7 @@ use serde::{Deserialize, Serialize}; // --------------------------------------------------------------------------- /// Current protocol version. Bumped when wire format changes incompatibly. -pub const PROTOCOL_VERSION: u32 = 19; +pub const PROTOCOL_VERSION: u32 = 20; /// Maximum allowed frame payload size (2 MB). Frames larger than this are /// rejected to prevent denial-of-service via oversized length prefixes. @@ -711,6 +711,12 @@ pub enum ServerMessage { /// Whether the ASCII input source should be active. active: bool, }, + + /// Ring the foreground client's outer terminal for pane-originated BEL characters. + TerminalBell { + /// Number of BEL characters parsed from one PTY read. + count: u16, + }, } // --------------------------------------------------------------------------- @@ -1555,6 +1561,15 @@ mod tests { } } + #[test] + fn server_terminal_bell_roundtrip() { + let msg = ServerMessage::TerminalBell { count: 3 }; + let encoded = bincode::serde::encode_to_vec(&msg, bincode::config::standard()).unwrap(); + let (decoded, _): (ServerMessage, _) = + bincode::serde::decode_from_slice(&encoded, bincode::config::standard()).unwrap(); + assert_eq!(msg, decoded); + } + // ---- Framing ---- #[test] |
