Wrap cut in change

This commit is contained in:
Jeremy Soller 2023-12-12 09:54:49 -07:00
parent 0236bfe65a
commit c97b09a028
No known key found for this signature in database
GPG key ID: DCFCA852D3906975

View file

@ -1102,7 +1102,9 @@ impl Application for App {
Some(Tab::Editor(tab)) => {
let mut editor = tab.editor.lock().unwrap();
let selection_opt = editor.copy_selection();
editor.start_change();
editor.delete_selection();
editor.finish_change();
if let Some(selection) = selection_opt {
return clipboard::write(selection);
}