Summary #
Removal of the stale-event suppression for Enter/Tab after minibuffer auto-accept could cause accidental newline/indent in the buffer.
The Problem #
In event_loop/main.lua lines 90-110 (old), the block that consumed stale Enter/Tab events by decrementing _mb_just_closed was removed. The commit claims transient handler removal handles this naturally, but if the terminal has buffered extra events (e.g. from key repeat or protocol), they will be processed after the minibuffer handler is gone and dispatch to the main view, inserting unintended characters.
Impact #
- category: correctness
- description: Stale key events from minibuffer auto-accept may leak into main view, inserting unintended characters.
Recommended Fix #
Re-add stale-event suppression or ensure the transient handler removal only happens after draining any remaining events for that minibuffer session. Consider a flag on the minibuffer that prevents re-opening within the same frame, or explicitly consume one event after submit/cancel.
Commit range: c022da8..c022da8
Code Review: CR-2026-07-27-11