1
0
mirror of https://github.com/helix-editor/helix synced 2024-11-10 10:34:45 +01:00

Exit select mode on surround commands (#4858)

This commit is contained in:
Jonathan LEI 2022-11-24 10:07:19 +08:00 committed by GitHub
parent ee06d4d337
commit 1d21683321
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

@ -4582,6 +4582,7 @@ fn surround_add(cx: &mut Context) {
let transaction = Transaction::change(doc.text(), changes.into_iter())
.with_selection(Selection::new(ranges, selection.primary_index()));
apply_transaction(&transaction, doc, view);
exit_select_mode(cx);
})
}
@ -4621,6 +4622,7 @@ fn surround_replace(cx: &mut Context) {
}),
);
apply_transaction(&transaction, doc, view);
exit_select_mode(cx);
});
})
}
@ -4648,6 +4650,7 @@ fn surround_delete(cx: &mut Context) {
let transaction =
Transaction::change(doc.text(), change_pos.into_iter().map(|p| (p, p + 1, None)));
apply_transaction(&transaction, doc, view);
exit_select_mode(cx);
})
}