# Move the cursor on search in Terminal if ViMode is active \(\#33305\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 665006c4144c35f8673bd342c56e8d39df8b9e17

Requested commit: 665006c4144c35f8673bd342c56e8d39df8b9e17

Commit: 665006c4144c35f8673bd342c56e8d39df8b9e17

Tree: 61ff7c333f2237714c3c01789f9c5b82da8c998e

Author: Aleksei Gusev

Committer: GitHub

## Message

```
Move the cursor on search in Terminal if ViMode is active (#33305)

Currently, the terminal search function doesn't work well with ViMode.
It matches the search terms, scrolls the active match in the view, but
it doesn't move the cursor to the match, which makes it useless for
navigating the scrollback in vimode.

With this improvement, if a user activates ViMode before the search Zed
moves the cursor to the active search terms. So, when the search dialog
is dismissed the cursor is places on the latest active search term and
it's possible to navigate the scrollback via ViMode using this place as
the starting point.


https://github.com/user-attachments/assets/63325405-ed93-4bf8-a00f-28ded5511f31

Release Notes:

- Improved the search function in the terminal when ViMode is activated
```

## Parents

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

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