# keymap_ui: Add ability to edit context \(\#34019\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/de9053c7ca276adba5d1244fe9805bf331a3c646)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: de9053c7ca276adba5d1244fe9805bf331a3c646

Requested commit: de9053c7ca276adba5d1244fe9805bf331a3c646

Commit: de9053c7ca276adba5d1244fe9805bf331a3c646

Tree: 81e24e2a33bb2ac931e4ee1bc834e5361438d162

Author: Ben Kunkle

Committer: GitHub

## Message

```
keymap_ui: Add ability to edit context (#34019)

Closes #ISSUE

Adds a context input to the keybind edit modal. Also fixes some bugs in
the keymap update function to handle context changes gracefully. The
current keybind update strategy implemented in this PR is
* when the context doesn't change, just update the binding in place
* when the context changes, but the binding is the only binding in the
keymap section, update the binding _and_ context in place
* when the context changes, and the binding is _not_ the only binding in
the keymap section, remove the existing binding and create a new section
with the update context and binding so as to avoid impacting other
bindings

Release Notes:

- N/A *or* Added/Fixed/Improved ...
```

## Parents

- [ddf3d992650d94f4986d8babd2fbf3ef51422e64](https://git.cafe/gitcafe/zed/commit/ddf3d992650d94f4986d8babd2fbf3ef51422e64?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/de9053c7ca276adba5d1244fe9805bf331a3c646?format=markdown)
