Skip to content

vim: Fix hang in visual block motion - #40723

Merged
dinocosta merged 3 commits into
mainfrom
vim-visual-block-hang
Oct 21, 2025
Merged

vim: Fix hang in visual block motion#40723
dinocosta merged 3 commits into
mainfrom
vim-visual-block-hang

Conversation

@dinocosta

Copy link
Copy Markdown
Member

The vim::visual::Vim.visual_block_motion method was recently updated (#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

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Oct 20, 2025
@dinocosta

Copy link
Copy Markdown
Member Author

Leaving this in Draft while I try to actually fix the way selections are handled so that moving selections horizontally in Visual Block over soft wrapped lines correctly jumps to the next Display Line instead of resetting the position.

Will make sure to merge before our Wednesday Cutoff, so we can at least get the hang removed 🧹

The `vim::visual::Vim.visual_block_motion` method was recently updated
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.
@dinocosta
dinocosta force-pushed the vim-visual-block-hang branch from 2e837f7 to fe309c0 Compare October 21, 2025 08:52
dinocosta and others added 2 commits October 21, 2025 10:25
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
@dinocosta
dinocosta marked this pull request as ready for review October 21, 2025 10:53
@dinocosta
dinocosta merged commit 3d4abde into main Oct 21, 2025
21 checks passed
@dinocosta
dinocosta deleted the vim-visual-block-hang branch October 21, 2025 11:23
dinocosta added a commit that referenced this pull request Oct 21, 2025
The `vim::visual::Vim.visual_block_motion` method was recently updated
(#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>
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
The `vim::visual::Vim.visual_block_motion` method was recently updated
(zed-industries#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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant