zed/crates/debugger_ui/src
Xipeng Jin f084e20c56
Fix stale pending keybinding indicators on focus change (#44678)
Closes #ISSUE

Problem:

- The status bar’s pending keystroke indicator (shown next to --NORMAL--
in Vim mode) didn’t clear when focus moved to another context, e.g.
hitting g in the editor then clicking the Git panel. The keymap state
correctly canceled the prefix, but observers that render the indicator
never received a “pending input changed” notification, so the UI kept
showing stale prefixes until a new keystroke occurred.

Fix:

- The change introduces a `pending_input_changed_queued` flag and a new
helper `notify_pending_input_if_needed` which will flushes the queued
notification as soon as we have an App context. The
`pending_input_changed` now resets the flag after notifying subscribers.

Before:


https://github.com/user-attachments/assets/7bec4c34-acbf-42bd-b0d1-88df5ff099aa

After:



https://github.com/user-attachments/assets/2264dc93-3405-4d63-ad8f-50ada6733ae7



Release Notes:

- Fixed: pending keybinding prefixes on the status bar now clear
immediately when focus moves to another panel or UI context.

---------

Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-12-17 16:51:16 +00:00
..
session Fix stale pending keybinding indicators on focus change (#44678) 2025-12-17 16:51:16 +00:00
tests debugger: Fix stack frame filter not persisting between sessions (#44352) 2025-12-08 01:43:30 +00:00
attach_modal.rs gpui: Implement From<String> for ElementId (#44447) 2025-12-09 09:08:59 +01:00
debugger_panel.rs Fix stale pending keybinding indicators on focus change (#44678) 2025-12-17 16:51:16 +00:00
debugger_ui.rs debugger: Fix evaluate selection running two evaluations & failing for Python and go (#44205) 2025-12-05 11:08:04 +00:00
dropdown_menus.rs Fix triggers for debugger thread and session lists not rendering (#40227) 2025-10-15 04:36:04 +00:00
new_process_modal.rs Fix stale pending keybinding indicators on focus change (#44678) 2025-12-17 16:51:16 +00:00
onboarding_modal.rs Fix stale pending keybinding indicators on focus change (#44678) 2025-12-17 16:51:16 +00:00
persistence.rs debugger: Add ability to only show stack frame entries from visible work trees (#37061) 2025-08-28 07:53:32 +00:00
session.rs Remove some unused events (#37498) 2025-09-04 09:09:28 +02:00
stack_trace_view.rs Basic side-by-side diff implementation (#43586) 2025-11-30 22:45:01 -05:00
tests.rs Automate settings registration (#42238) 2025-11-07 22:27:14 +00:00