I noticed that our line deletion actions are inconsistent.
For `DeleteToBeginningOfLine`:
- `one «two threeˇ» four` -> ` four` ✅
- `one «ˇtwo three» four` -> ` four` ✅
Great, these have the same results, regardless of selection direction.
For `DeleteToEndOfLine`:
- `one «two threeˇ» four` -> ` one ` ✅
- `one «ˇtwo three» four` -> `one two three` ❌
Whoops, that second one should be the same, assuming that selection
direction again shouldn't matter, as in the case of
`DeleteToBeginningOfLine`.
The same issue exists for `CutToEndOfLine`:
- `The quick «brownˇ» fox` -> `The quick ` ✅
- `The quick «ˇbrown» fox` -> `The quick brown` ❌
I unified the end-of-line actions to match `DeleteToBeginningOfLine`:
selection direction no longer matters, so the whole selection is always
included.
---
- [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 `editor: delete to end of line` to behave consistently
regardless of selection direction.
- Fixed `editor: cut to end of line` to behave consistently regardless
of selection direction.