Add stop_at_indent for Editor::DeleteToBeginningOfLine (#25688)

Added test_beginning_of_line_stop_at_indent editor test

- Follow-up to: https://github.com/zed-industries/zed/pull/25428
- Replaces: https://github.com/zed-industries/zed/pull/25346

This is all authored by @felixpackard in #25346
I just updated it to use `stop_at_indent` instead of
`stop_at_first_char`.

Release Notes:

- Added support for `stop_at_indent` to
`Editor::DeleteToBeginningOfLine` (thanks
[@felixpackard](https://github.com/felixpackard))

Co-authored-by: Felix Packard <felix@rigr.gg>
This commit is contained in:
Peter Tripp 2025-03-01 11:03:47 -05:00 committed by GitHub
parent d115cb1944
commit aa1ab50656
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 123 additions and 5 deletions

View file

@ -9516,7 +9516,7 @@ impl Editor {
pub fn delete_to_beginning_of_line(
&mut self,
_: &DeleteToBeginningOfLine,
action: &DeleteToBeginningOfLine,
window: &mut Window,
cx: &mut Context<Self>,
) {
@ -9530,7 +9530,7 @@ impl Editor {
this.select_to_beginning_of_line(
&SelectToBeginningOfLine {
stop_at_soft_wraps: false,
stop_at_indent: false,
stop_at_indent: action.stop_at_indent,
},
window,
cx,