# vim: Allow count and repeat for "r" and "shift-r" action \(\#13287\) · gitcafe/zed

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

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

Visibility: public

Requested revision: dea928b00caf853b60fc19890dcb557beb814936

Requested commit: dea928b00caf853b60fc19890dcb557beb814936

Commit: dea928b00caf853b60fc19890dcb557beb814936

Tree: 1991f5049f63be60793985c60726a5a973f9ae84

Author: Benjamin Davies

Committer: GitHub

## Message

```
vim: Allow count and repeat for "r" and "shift-r" action (#13287)

Fixing the "r" action just involved adapting `normal_replace` to replace
multiple characters.

Fixing the "shift-r" command was less straightforward. The bindings for
`vim::BeforeNormal` in replace mode were being overwritten and several
other steps required for action repetition were not performed. Finally,
the cursor adjustment after re-entering normal mode was duplicated
(`vim::BeforeNormal` was now triggered correctly) so I removed the
special case for replace mode.

Release Notes:

- Fixed vim "r" action to accept a count argument
- Fixed vim "shift-r" action to accept a count argument and allow
repetition

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
```

## Parents

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

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