mirror of
https://github.com/codewhale-hq/Codewhale.git
synced 2026-11-07 17:09:13 -10:00
fix(tui): restore Windows wheel capture after external editing
F4 disabled VT mouse modes but left the Windows console mouse flag set. Crossterm resume then wrote the already-set flag, so ConPTY did not emit another enable transition. Release the Windows capture state before the existing direct VT resets; recovery can now turn it on again. Keep the PTY resets for mintty. No new product tests or code comments. Thanks @SparkofSpike for distinguishing terminal scrollback from transcript scrolling. Refs #6652. Windows 11 ARM / Windows Terminal 1.24.12741.0, ordinary Hunter session: checksum-verified published v0.10.1 reproduces working transcript wheel, F4 to Notepad, failed wheel after return while PageUp works, then restored wheel after /inline followed by /fullscreen. The editor probe measured inputMode 159 (0x9f), mouse=true, raw=false. The affected external-editor source is byte-identical between v0.10.1 and the pre-fix candidate. This proves the old defect and recovery path, not the patched executable or the reporter's separate hours-long slowdown. Patched Windows build and interactive acceptance remain pending; hosted Windows CI is the gate. macOS focused existing editor suite: Summary [0.587s] 13 tests run: 13 passed, 15298 skipped (filtered). No failures; cargo fmt --all -- --check and git diff --check passed. npm test: 1312 passed, 0 failed, 7 skipped: node suites 101/0, 19/0, 413/0 (7 skipped), 7/0; Vitest 772 passed. npm run check:web passed, including latest-release, facts and build.
This commit is contained in:
1 parent
2c3997673b
commit
cf7199b52e
3 files changed
+15
-3
No files matched your search
@@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [0.10.2] - 2026-10-13
|
||||
|
||||
- Windows mouse-wheel scrolling is restored after returning from the external
|
||||
editor. The handoff now releases both Windows console mouse capture and
|
||||
terminal mouse modes. Thanks @SparkofSpike for distinguishing terminal
|
||||
scrollback from transcript scrolling in #6652; the separate hours-long
|
||||
scrolling slowdown still needs reproduction.
|
||||
- Shell classification accepts PowerShell’s call operator, quoted ampersands
|
||||
and combined output redirection without losing destructive commands in
|
||||
nested shell payloads or after command separators. Thanks @SparkofSpike
|
||||
|
||||
@@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [0.10.2] - 2026-10-13
|
||||
|
||||
- Windows mouse-wheel scrolling is restored after returning from the external
|
||||
editor. The handoff now releases both Windows console mouse capture and
|
||||
terminal mouse modes. Thanks @SparkofSpike for distinguishing terminal
|
||||
scrollback from transcript scrolling in #6652; the separate hours-long
|
||||
scrolling slowdown still needs reproduction.
|
||||
- Shell classification accepts PowerShell’s call operator, quoted ampersands
|
||||
and combined output redirection without losing destructive commands in
|
||||
nested shell payloads or after command separators. Thanks @SparkofSpike
|
||||
|
||||
@@ -326,9 +326,11 @@ fn suspend_tui_child_modes<W: Write>(
|
||||
|
||||
fn disable_mouse_capture_for_child<W: Write>(writer: &mut W) {
|
||||
// Crossterm's mouse-capture command takes a WinAPI path on Windows and
|
||||
// does not emit bytes into PTY-style terminals such as mintty. External
|
||||
// editors inherit the PTY state, so send the xterm reset sequences
|
||||
// directly here.
|
||||
// does not emit bytes into PTY-style terminals such as mintty. Release
|
||||
// the WinAPI state before resetting the inherited PTY state so resume
|
||||
// can re-enable capture through a real console-mode transition.
|
||||
#[cfg(windows)]
|
||||
let _ = execute!(writer, crossterm::event::DisableMouseCapture);
|
||||
const DISABLE_MOUSE_CAPTURE: &[u8] = b"\x1b[?1006l\x1b[?1015l\x1b[?1003l\x1b[?1002l\x1b[?1000l";
|
||||
if let Err(err) = writer.write_all(DISABLE_MOUSE_CAPTURE) {
|
||||
tracing::debug!(?err, "DisableMouseCapture direct reset ignored");
|
||||
|
||||
Reference in new issue
Block a user