From 2da35f57d1fac6f8b9df5c723a60e94a2589b3e6 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 24 Sep 2026 17:14:43 +0000 Subject: [PATCH] ImGui: a suppressed text event no longer eats the next character (B8) Ctrl+V, the zoom chords and new-window set a one-shot flag to drop the text event their key press would produce, but SDL sends none for Ctrl chords, so the flag dropped the next character typed instead (typing "xyz" after Ctrl+V gave "yz", reproduced under Xvfb). The flag now applies only until the next key press. C-k and Meta suffixes are still suppressed (checked: C-k s saves without inserting "s"; M-f moves without inserting "f"). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_015rcVQiiWyTzoNrsvLSaAfB --- ImGuiInputHandler.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ImGuiInputHandler.cc b/ImGuiInputHandler.cc index 47de96c..31d748c 100644 --- a/ImGuiInputHandler.cc +++ b/ImGuiInputHandler.cc @@ -346,6 +346,11 @@ ImGuiInputHandler::ProcessSDLEvent(const SDL_Event &e) return false; } case SDL_KEYDOWN: { + // A suppression request covers only the text event of the key that + // made it, which arrives before the next key press. Chords such as + // Ctrl+V produce no text event at all, and a leftover request ate + // the next character typed (B8). + suppress_text_input_once_ = false; // Remember state before mapping; used for TEXTINPUT suppression heuristics const bool was_k_prefix = k_prefix_; const bool was_esc_meta = esc_meta_;