# vim: Fix bug where repeat operator could lead to unrecoverable replaying state \(\#46376\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 00e3b2eb9104188994a3c35c2c82f909136db740

Requested commit: 00e3b2eb9104188994a3c35c2c82f909136db740

Commit: 00e3b2eb9104188994a3c35c2c82f909136db740

Tree: e318d45c4239021ef70064a8ab4baf2e60b2cb0c

Author: Dino

Committer: GitHub

## Message

```
vim: Fix bug where repeat operator could lead to unrecoverable replaying state (#46376)

When a recorded action moves focus away from the editor (e.g.,
`buffer_search::Deploy`), the `EndRepeat` action handler is not invoked
because is node is no longer on the dispatch path. This left
`dot_replaying` set to `true`, causing subsequent repeats to malfunction
and the `VimGlobals.pre_count` value to never be reset.

Reset `dot_replaying` as a fail-safe when the replayer exhausts its
action queue, ensuring the state is always cleaned up regardless of
whether `EndRepeat` was handled.

Release Notes:

- Fixed vim repeat (`.`) breaking when the recorded action moves focus
away from the editor

Co-authored-by: neel <neel@chot.ai>
```

## Parents

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

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