editor: Treat punctuation as separate word boundaries (#62224)
# Objective
Fixes FR-149
- Make word movement and selection predictable around punctuation.
- Prior art: [#58882](https://github.com/zed-industries/zed/pull/58882),
[#61916](https://github.com/zed-industries/zed/pull/61916), and their
revert [#62213](https://github.com/zed-industries/zed/pull/62213).
## Solution
- Treat words and punctuation runs as separate movement units in both
directions.
- This adds a stop between leading punctuation and its following word,
such as `.▏foo`.
## Testing
- Added table-driven coverage for reported examples, delimiters,
operators, punctuation runs, and Unicode punctuation.
- Tested editor movement, selection, and deletion behavior.
## Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
---
Release Notes:
- Fixed word movement and selection stopping on the wrong side of
punctuation.
101ca00a13Ben Kunkle committed on 8/6/2026, 5:51:48 PM· committed by GitHubparentb914ba5