@@ -4348,13 +4348,17 @@ fn rotate_selection_contents_backward(cx: &mut Context) {
4348// tree sitter node selection
4348// tree sitter node selection
4350fn expand_selection(cx: &mut Context) {
4350fn expand_selection(cx: &mut Context) {
4351+ let motion = |editor: &mut Editor| {
4351− let (view, doc) = current!(cx.editor);
4352+ let (view, doc) = current!(editor);
4353− if let Some(syntax) = doc.syntax() {
4354+ if let Some(syntax) = doc.syntax() {
4354− let text = doc.text().slice(..);
4355+ let text = doc.text().slice(..);
4355− let selection = object::expand_selection(syntax, text, doc.selection(view.id));
4356+ let selection = object::expand_selection(syntax, text, doc.selection(view.id));
4356− doc.set_selection(view.id, selection);
4357+ doc.set_selection(view.id, selection);
4360+ motion(&mut cx.editor);
4361+ cx.editor.last_motion = Some(Motion(Box::new(motion)));
4360fn match_brackets(cx: &mut Context) {
4364fn match_brackets(cx: &mut Context) {