Prevent moving across excerpts on `Editor::delete`

Antonio Scandurra created

Change summary

crates/editor/src/editor.rs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Detailed changes

crates/editor/src/editor.rs 🔗

@@ -3557,7 +3557,9 @@ impl Editor {
                 s.move_with(|map, selection| {
                     if selection.is_empty() && !line_mode {
                         let cursor = movement::right(map, selection.head());
-                        selection.set_head(cursor, SelectionGoal::None);
+                        selection.end = cursor;
+                        selection.reversed = true;
+                        selection.goal = SelectionGoal::None;
                     }
                 })
             });