# vim: Change approach to fixing vim's temporary mode bug \(\#42894\) · gitcafe/zed

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

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

Visibility: public

Requested revision: ee420d530eb49781638b664f3d9807bcd34dd2ea

Requested commit: ee420d530eb49781638b664f3d9807bcd34dd2ea

Commit: ee420d530eb49781638b664f3d9807bcd34dd2ea

Tree: b619761cc6ef960b303254572c9146577dcae5cf

Author: Dino

Committer: GitHub

## Message

```
vim: Change approach to fixing vim's temporary mode bug (#42894)

The `Vim.exit_temporary_normal` method had been updated
(https://github.com/zed-industries/zed/pull/42742) to expect and
`Option<&Motion>` that would then be used to determine whether to move
the cursor right in case the motion was `Some(EndOfLine { ..})`.
Unfortunately this meant that all callers now had to provide this
argument, even if just `None`.

After merging those changes I remember that we could probably play
around with `clip_at_line_ends` so this commit removes those intial
changes in favor of updating the `vim::normal::Vim.move_cursor` method
so that, if vim is in temporary mode and `EndOfLine` is used, it
disables clipping at line ends so that the newline character can be
selected.

Closes [#42278](https://github.com/zed-industries/zed/issues/42278)

Release Notes:

- N/A
```

## Parents

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

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