Files
zed/crates
Ben Kunkle 101ca00a13 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.
2026-08-06 17:51:48 +00:00
..
2026-08-05 16:54:27 +00:00
2026-04-29 10:27:47 +00:00
2026-05-04 06:30:47 +00:00
2026-08-04 15:53:09 +00:00
2026-07-21 07:58:16 +00:00
…
…
2026-05-27 10:31:53 +00:00
2026-04-29 10:27:47 +00:00
2026-05-27 10:31:53 +00:00
2026-05-27 10:31:53 +00:00
2026-08-05 15:43:29 +00:00