Fix unwrap error when undo after shell_append_output (#2625)

This commit is contained in:
Andrey Tkachenko 2022-05-31 18:08:16 +04:00 committed by GitHub
parent fc8c488322
commit fa2eeccc57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4430,6 +4430,7 @@ fn shell(cx: &mut compositor::Context, cmd: &str, behavior: &ShellBehavior) {
if behavior != &ShellBehavior::Ignore {
let transaction = Transaction::change(doc.text(), changes.into_iter());
doc.apply(&transaction, view.id);
doc.append_changes_to_history(view.id);
}
// after replace cursor may be out of bounds, do this to