# Fix bug where vim commands were copied on each update_matches \(\#3680\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 3c3e5ed7d8878e8bf2159026cbe2febe912fdd13

Requested commit: 3c3e5ed7d8878e8bf2159026cbe2febe912fdd13

Commit: 3c3e5ed7d8878e8bf2159026cbe2febe912fdd13

Tree: 80a4a8ceec7e1d6df33751e1c508717ea6a463bf

Author: Conrad Irwin

Committer: GitHub

## Message

```
Fix bug where vim commands were copied on each update_matches (#3680)

In zed1, the array of commands was recalculated on every update_matches,
In zed2 it's cached before we change the focus.

Release Notes:

- N/A
```

## Parents

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

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

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