# vim: Avoid removing keymap context when blurred \(\#9960\) · gitcafe/zed

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

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

Visibility: public

Requested revision: dde27483a453bff9cba5a80b3fa35b2cb7b9cf8a

Requested commit: dde27483a453bff9cba5a80b3fa35b2cb7b9cf8a

Commit: dde27483a453bff9cba5a80b3fa35b2cb7b9cf8a

Tree: 70f78c0c0d5fea39d45c102e6b8c7be1d7d68af0

Author: Mehmet Efe Akça

Committer: GitHub

## Message

```
vim: Avoid removing keymap context when blurred (#9960)

Release Notes:

- Fixes #4502 

Notes:
I removed this line of code which removes the vim keymap contexts when
an editor is blurred.


https://github.com/zed-industries/zed/blob/16e6f5643cec67982a88bebee6d8d49537af7306/crates/vim/src/vim.rs#L703-L705

I tried whether the editor context would be poisoned when switching
between two editors and disabling vim mode and switching back but the
context looked normal. If this change is wrong, please advise. I could
not find why this piece of code was required.

This fixes #4502 as the reason why keybinds did not show up was because
the vim context was removed from the editor's keymap contexts. Other
paths for a fix could be to filter out vim predicates when finding
keybinds for actions but I believe that'd add unnecessary complexity.

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
```

## Parents

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

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