Files
LLeMbas-TTY/window
KOGA Mitsuhiro 900bab10d6 Fix RefCell borrow conflict when toggling IME on Windows (#7529)
* Fix RefCell borrow conflict when toggling IME on Windows

When IME is active, the `key` function was holding a borrow on the
window's inner RefCell while calling `TranslateMessage`. This Windows
API can trigger other window messages (like WM_SIZE) via
`CtfImeCreateInputContext`, which then attempt to borrow the same
RefCell, causing a panic with "RefCell already borrowed".

Similarly, `ime_set_context` was holding a borrow while calling
`DefWindowProcW`, which can also trigger recursive window messages.

Fix by dropping the borrow prior to triggering potentially recursive calls.

Fixes the crash that occurred when toggling IME (e.g., pressing
Hankaku/Zenkaku key) after splitting a pane on Windows.
2026-06-07 08:17:27 +01:00
..
2024-05-04 16:09:38 -07:00
2022-08-17 07:19:12 -07:00