## Summary Fixes #48725 When using the keymap editor to delete or re-bind default keybindings, two issues caused stale entries to persist: - **Deleting a default binding** created a `NoAction` suppression entry in `keymap.json` (correct for GPUI-level suppression), but the keymap editor displayed it as a phantom `<null>` row alongside the greyed-out default. Searching by keystroke showed both entries, and clash detection counted the phantom as a real binding. - **Changing a default binding's keystroke** (e.g. `⌥⌘T` → `⇧⌃⌘T`) added the new binding but never suppressed the original default under the old keystroke. The old default continued appearing in keystroke searches and clash warnings. ## Fix 1. **Filter `NoAction` suppression bindings from the keymap editor display.** These remain in the internal binding list for conflict detection (so overridden defaults are still correctly greyed out), but are excluded from the visible match results. 2. **Append a `null` suppression for the old keystroke when replacing a non-user binding with a different keystroke.** When `update_keybinding` converts a `Replace` to `Add` for a non-user binding and the keystroke changes, it now also writes `{"old-keystroke": null}` (with the original context) to suppress the stale default. ## Reproduction steps (verified fixed) 1. Open the keymap editor 2. Click Search by Keystroke and press `⌥⌘T` 3. You should see "agent: new thread" and "pane: close other items" (both Default) 4. Right-click "agent: new thread" and choose Delete 5. Double-click "pane: close other items", change keystroke to `⇧⌃⌘T`, click Save 6. Verify no `<null>` phantom row appears, and no stale defaults remain under `⌥⌘T` 7. Close and reopen the keymap editor, search `⌥⌘T` — no results 8. Search for "editor: wrap selections in tag" and assign `⌥⌘T` — no clash warnings ## Test plan - [x] Existing `keymap_update` and `test_keymap_remove` tests pass - [x] Added test: replacing a non-user binding **without** changing the keystroke produces no suppression - [x] Added test: replacing a non-user binding **with** context and keystroke change produces a suppression that preserves the context - [x] Manual verification of all reproduction steps above Release Notes: - Fixed an issue with the keymap editor where where the defaults would not be completely removed when deleting or overriding default keybindings --------- Co-authored-by: Ben Kunkle <ben@zed.dev>
Zed
Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Installation
On macOS, Linux, and Windows you can download Zed directly or install Zed via your local package manager (macOS/Linux/Windows).
Other platforms are not yet available:
- Web (tracking issue)
Developing Zed
Contributing
See CONTRIBUTING.md for ways you can contribute to Zed.
Also... we're hiring! Check out our jobs page for open roles.
Licensing
License information for third party dependencies must be correctly provided for CI to pass.
We use cargo-about to automatically comply with open source licenses. If CI is failing, check the following:
- Is it showing a
no license specifiederror for a crate you've created? If so, addpublish = falseunder[package]in your crate's Cargo.toml. - Is the error
failed to satisfy license requirementsfor a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to theacceptedarray inscript/licenses/zed-licenses.toml. - Is
cargo-aboutunable to find the license for a dependency? If so, add a clarification field at the end ofscript/licenses/zed-licenses.toml, as specified in the cargo-about book.
Sponsorship
Zed is developed by Zed Industries, Inc., a for-profit company.
If you’d like to financially support the project, you can do so via GitHub Sponsors. Sponsorships go directly to Zed Industries and are used as general company revenue. There are no perks or entitlements associated with sponsorship.