# vim: Fix dot repeat after macro replay not capturing insertion text \(\#57684\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 80a4042ff584ea68b5d5a072926bdb9af4792b45

Requested commit: 80a4042ff584ea68b5d5a072926bdb9af4792b45

Commit: 80a4042ff584ea68b5d5a072926bdb9af4792b45

Tree: 37530aec0bb05517fd583e99305873686589e6f6

Author: Fanteria

Committer: GitHub

## Message

```
vim: Fix dot repeat after macro replay not capturing insertion text (#57684)

Closes #47251

Fix dot (`.`) repeat not correctly repeating the last change after
replaying a macro (`@register`)
([#47251](https://github.com/zed-industries/zed/issues/47251))

When replaying a macro that contains text insertions,
`replay_insert_event` calls `handle_input` directly and never emits
`InputHandled`, so the `observe_insertion` subscription never fires.
This left the dot register stale — `.` after `@register` would repeat an
earlier change instead of the last one made by the macro.

Fix by calling `observe_insertion` explicitly in the
`ReplayableAction::Insertion` branch of `Replayer::next`.

Release Notes:

- Fixed dot (`.`) repeat not repeating the last change made by a macro
(`@register`).

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
```

## Parents

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

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