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/app | |
| 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/app')
| -rw-r--r-- | src/app/actions.rs | 3 | ||||
| -rw-r--r-- | src/app/api.rs | 13 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/app/actions.rs b/src/app/actions.rs index 51de049c..40707cee 100644 --- a/src/app/actions.rs +++ b/src/app/actions.rs @@ -2902,9 +2902,10 @@ impl AppState { .collect() } } - // Both intercepted before this dispatch — in App::handle_internal_event (monolithic) + // Intercepted before this dispatch — in App::handle_internal_event (monolithic) // or via HeadlessServer forwarding to the foreground client (server); never touch // AppState. Kept for AppEvent exhaustiveness. + AppEvent::TerminalBell { .. } => Vec::new(), AppEvent::ClipboardWrite { .. } => Vec::new(), AppEvent::PrefixInputSource { .. } => Vec::new(), AppEvent::TerminalCwdReported { pane_id, cwd } => { diff --git a/src/app/api.rs b/src/app/api.rs index 5f81a5cb..c2130f36 100644 --- a/src/app/api.rs +++ b/src/app/api.rs @@ -64,6 +64,10 @@ impl App { results, cache_updates, } => self.handle_git_status_refreshed(results, cache_updates), + ev @ AppEvent::TerminalBell { .. } => { + self.handle_internal_event(ev); + false + } ev => { self.handle_internal_event(ev); true @@ -97,6 +101,15 @@ impl App { } pub(crate) fn handle_internal_event(&mut self, ev: AppEvent) { + if let AppEvent::TerminalBell { count, .. } = ev { + if let Err(err) = + crate::terminal_effects::write_terminal_bells(&mut std::io::stdout(), count) + { + tracing::warn!(err = %err, "failed to emit terminal bell"); + } + return; + } + if let AppEvent::ClipboardWrite { content } = ev { #[cfg(not(test))] crate::selection::write_osc52_bytes(&content); |
