terminal: Respect word boundaries after tree branches (#62076)
# Objective
Fixes #61767.
Double-clicking a service name after a `systemctl` tree branch also
selects the `└─` prefix.
## Solution
Add `─` to Alacritty's semantic escape characters for both PTY and
display-only terminals. The regression test checks that selecting
`└─zms-demo.target` returns only `zms-demo.target`.
## Testing
- `cargo fmt --all -- --check`
- `git diff --check`
- Added `semantic_selection_stops_at_tree_branch`
The regression test could not run locally because this Windows
environment does not have MSVC's `link.exe`. It can be run with:
`cargo test -p terminal semantic_selection_stops_at_tree_branch`
## 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
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
---
Release Notes:
- Fixed terminal word selection around tree branch glyphs.
f25b256f2cAyush committed on 8/5/2026, 9:22:44 AM· committed by GitHubparent8e18ab0