Skip to content

vim: Fix replace in helix select mode#57553

Merged
smitbarmase merged 1 commit into
zed-industries:mainfrom
terror:helix-select-replace
May 26, 2026
Merged

vim: Fix replace in helix select mode#57553
smitbarmase merged 1 commit into
zed-industries:mainfrom
terror:helix-select-replace

Conversation

@terror

@terror terror commented May 23, 2026

Copy link
Copy Markdown
Contributor

Resolves #57522

This diff fixes r in Helix select mode. The keybinding already pushed the replace operator in helix_select, but when the replacement character was typed, the operator dispatch only handled HelixNormal, so selected text in HelixSelect fell through and cleared the operator without editing the buffer.

With this change, Helix select mode uses the same helix_replace path as Helix normal mode. Multi-character selections now replace each selected grapheme with the typed character and return to Helix normal mode, matching the existing behaviour for Helix normal selections.

Release Notes:

  • Fixed r not replacing multi-character selections in Helix select mode.

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label May 23, 2026
@smitbarmase smitbarmase added the area:parity/helix Feedback for Helix parity features label May 25, 2026

@smitbarmase smitbarmase left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, works as expected.

@smitbarmase smitbarmase enabled auto-merge May 26, 2026 14:06
@smitbarmase smitbarmase added this pull request to the merge queue May 26, 2026
Merged via the queue into zed-industries:main with commit e7bbfd5 May 26, 2026
44 checks passed
@smitbarmase smitbarmase self-assigned this May 27, 2026
TomPlanche pushed a commit to TomPlanche/zed that referenced this pull request Jun 2, 2026
Resolves zed-industries#57522

This diff fixes `r` in Helix select mode. The keybinding already pushed
the replace operator in `helix_select`, but when the replacement
character was typed, the operator dispatch only handled `HelixNormal`,
so selected text in `HelixSelect` fell through and cleared the operator
without editing the buffer.

With this change, Helix select mode uses the same `helix_replace` path
as Helix normal mode. Multi-character selections now replace each
selected grapheme with the typed character and return to Helix normal
mode, matching the existing behaviour for Helix normal selections.

Release Notes:
- Fixed `r` not replacing multi-character selections in Helix select
mode.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:parity/helix Feedback for Helix parity features cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Helix: r while in vim_mode == helix_select doesn't work

3 participants