# vim: Fix hang in visual block motion \(\#40723\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 3d4abde55afa6f01bc9f2451e49af3aeb40a89c9

Requested commit: 3d4abde55afa6f01bc9f2451e49af3aeb40a89c9

Commit: 3d4abde55afa6f01bc9f2451e49af3aeb40a89c9

Tree: 4e97575d37825c799774cb26602b489eab97fcdf

Author: Dino

Committer: GitHub

## Message

```
vim: Fix hang in visual block motion (#40723)

The `vim::visual::Vim.visual_block_motion` method was recently updated
(https://github.com/zed-industries/zed/pull/39355) in order to jump
between buffer rows instead of display rows. However, with this now
being the case, the `break` condition was never met when the motion was
horizontal rather than vertical and soft wrapped lines were used. As
such, this commit udpates the condition to ensure it's always reached,
preventing the hanging from happening.

Release Notes:

- Fixed hang in Vim's visual block motions when updating selections

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
```

## Parents

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

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