diff --git a/CHANGELOG.md b/CHANGELOG.md index e88c866b..5e282dd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,13 +5,19 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.8.24] - 2026-05-08 +## [0.8.24] - 2026-05-09 A bugfix + refactor release picking up the backlog after the v0.8.23 security release. ### Fixed +- **Mouse-wheel scroll survives focus toggles** — on macOS, switching away + (Cmd+Tab, opening the screenshot tool, etc.) and back can drop the + terminal's mouse-tracking mode, leaving wheel scroll dead until restart. + The TUI now re-arms `EnableMouseCapture` on `FocusGained` alongside the + existing keyboard-mode recapture, so wheel events keep flowing after a + focus round-trip. - **Workspace-local slash commands are now loaded (#1259)** — user command files placed in `/.deepseek/commands/`, `/.claude/commands/`, and `/.cursor/commands/` are diff --git a/crates/tui/src/tui/ui.rs b/crates/tui/src/tui/ui.rs index 06354a02..9993864c 100644 --- a/crates/tui/src/tui/ui.rs +++ b/crates/tui/src/tui/ui.rs @@ -1596,8 +1596,14 @@ async fn run_event_loop( // terminal's keyboard mode, which breaks IME compositor state. // Acknowledging FocusGained and re-pushing the flags restores // the IME so CJK input methods work after a focus toggle. + // The same reset can drop the terminal's mouse-tracking mode, + // leaving wheel scroll dead until restart — re-arm mouse + // capture on focus-gain so wheel events keep flowing. if terminal_event_needs_viewport_recapture(&evt) { push_keyboard_enhancement_flags(terminal.backend_mut()); + if app.use_mouse_capture { + let _ = execute!(terminal.backend_mut(), EnableMouseCapture); + } force_terminal_repaint = true; app.needs_redraw = true; }