aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui/editor.rs
diff options
context:
space:
mode:
authorMichael Davis2022-10-10 19:56:26 +0000
committerBlaž Hrastnik2022-10-11 03:17:32 +0000
commit0aedef03334dfc0cb2a723cce23abc5b4ca55a22 (patch)
tree17e017760f23147c821bb25b0af027c47b08f10b /helix-term/src/ui/editor.rs
parentd418f0795d8a33c83ad87c5530c4819d83da09ef (diff)
Apply transactions to Views
This change adds View::apply calls for all Document::apply call-sites, ensuring that changes to a document do not leave invalid entries in the View's jumplist.
Diffstat (limited to 'helix-term/src/ui/editor.rs')
-rw-r--r--helix-term/src/ui/editor.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index 18e1271f..3b71748b 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -988,7 +988,7 @@ impl EditorView {
InsertEvent::CompletionApply(compl) => {
let (view, doc) = current!(cxt.editor);
- doc.restore(view.id);
+ doc.restore(view);
let text = doc.text().slice(..);
let cursor = doc.selection(view.id).primary().cursor(text);
@@ -1003,6 +1003,7 @@ impl EditorView {
}),
);
doc.apply(&tx, view.id);
+ view.apply(&tx, doc);
}
InsertEvent::TriggerCompletion => {
let (_, doc) = current!(cxt.editor);