# vim: Fix bug where \`d \. \.\` freezes the editor \(\#42145\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 4a36f67f94970958cb991872f6ad5f27185c8f3d

Requested commit: 4a36f67f94970958cb991872f6ad5f27185c8f3d

Commit: 4a36f67f94970958cb991872f6ad5f27185c8f3d

Tree: d1c23645ad327d6a6d14df1493e0a41e3899f7a8

Author: AidanV

Committer: GitHub

## Message

```
vim: Fix bug where `d . .` freezes the editor (#42145)

This bug seems to be caused by pushing an operator (i.e. `d`) followed
by a repeat (i.e. `.`) so the recording includes the push operator and
the repeat. When this is repeated (i.e. `.`) it causes an infinite loop.

This change fixes this bug by pushing a ClearOperator action if there is
an ongoing recording when repeat is called.

Release Notes:

- Fixed bug where pressing `d . .` in Vim mode would freeze the editor.

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
```

## Parents

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

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