Skip to content

Conversation

@RubenFricke
Copy link

@RubenFricke RubenFricke commented Jan 7, 2026

Closes #40110

Changes:

  • DeleteToPreviousSubwordStart now deletes \n separately from preceding subwords and whitespace.
  • DeleteToNextSubwordEnd now deletes \n and any following whitespace separately from subsequent subwords.
  • Added an ignore_newlines flag to both actions to optionally retain the old behavior.

These modifications align the subword commands with their word counterparts and with other popular editors like VSCode and Sublime.

Related to: #16848

Release Notes:

  • Improved DeleteToPreviousSubwordStart and DeleteToNextSubwordEnd interactions around newlines. You can opt-in into the previous behavior by adding {"ignore_newlines": true} to either action's binds in your keymap.

This is my first contribution to Zed! If anything should be done differently, please let me know. Happy to learn :)

@cla-bot
Copy link

cla-bot bot commented Jan 7, 2026

We require contributors to sign our Contributor License Agreement, and we don't have @RubenFricke on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@RubenFricke
Copy link
Author

@cla-bot check

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 7, 2026
@cla-bot
Copy link

cla-bot bot commented Jan 7, 2026

The cla-bot has been summoned, and re-checked this pull request!

@RubenFricke RubenFricke changed the title editor: Add ignore_newlines parameter to subword deletion actions editor: Fix DeleteToPreviousSubwordStart and DeleteToNextSubwordEnd interaction with newlines Jan 7, 2026
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.

Mismatched behavior for delete word and subword commands

1 participant