# vim: Fix visual block Shift-I jumping to original cursor after Ctrl-D scroll \(\#50822\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 3af7b644a6114eb325ec361b780bcc80007cc29d

Requested commit: 3af7b644a6114eb325ec361b780bcc80007cc29d

Commit: 3af7b644a6114eb325ec361b780bcc80007cc29d

Tree: 0cbf8aca97094b1ff4de99b6e1b54c5744d38613

Author: Xiaobo Liu

Committer: GitHub

## Message

```
vim: Fix visual block Shift-I jumping to original cursor after Ctrl-D scroll (#50822)

Ensure that the `vim::visual::Vim::visual_block_motion` method is called
when `scroll_editor` is called while in Visual Block mode. This fixes an
issue where, after getting into `Visual Block` mode, if the user used
`ctrl-d` or `ctrl-u` to scroll half of the page, the wrong selection
would be made and, if `shift-i` was used to start inserting at the start
of the line, a single cursor would be placed at the cursor position
where the selection was started, instead of one cursor per each of the
selected lines.

These changes ensure that we now match Neovim's behavior for the same
flow.

---------

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
```

## Parents

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

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