# Fix slowness in Terminal when vi-mode is enabled \(\#31824\) · gitcafe/zed

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

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

Visibility: public

Requested revision: cc536655a1efc2b82a978faf22a1ad9ffc3a57d8

Requested commit: cc536655a1efc2b82a978faf22a1ad9ffc3a57d8

Commit: cc536655a1efc2b82a978faf22a1ad9ffc3a57d8

Tree: 96899d3570af32b6358da7d4dc142e7360e0c08f

Author: Aleksei Gusev

Committer: GitHub

## Message

```
Fix slowness in Terminal when vi-mode is enabled (#31824)

It seems alacritty handles vi-mode motions in a special way and it is up
to the client to decide when redraw is necessary. With this change,
`TerminalView` notifies the context if a keystroke is processed and vi
mode is enabled.

Fixes #31447

Before:


https://github.com/user-attachments/assets/a78d4ba0-23a3-4660-a834-2f92948f586c

After:


https://github.com/user-attachments/assets/cabbb0f4-a1f9-4f1c-87d8-a56a10e35cc8

Release Notes:

- Fixed sluggish cursor motions in Terminal when Vi Mode is enabled
[#31447]
```

## Parents

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

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