aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/commands.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-view/src/commands.rs')
-rw-r--r--helix-view/src/commands.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/helix-view/src/commands.rs b/helix-view/src/commands.rs
index 1d7737f0..e29d070e 100644
--- a/helix-view/src/commands.rs
+++ b/helix-view/src/commands.rs
@@ -391,6 +391,12 @@ fn append_changes_to_history(view: &mut View) {
// annotations either add a new layer or compose into the previous one.
let transaction = Transaction::from(changes).with_selection(view.state.selection().clone());
+ // increment document version
+ // TODO: needs to happen on undo/redo too
+ view.state.version += 1;
+
+ // TODO: trigger lsp/documentDidChange with changes
+
// HAXX: we need to reconstruct the state as it was before the changes..
let (doc, selection) = view.state.old_state.take().unwrap();
let mut old_state = State::new(doc);
@@ -399,7 +405,6 @@ fn append_changes_to_history(view: &mut View) {
// TODO: take transaction by value?
view.history.commit_revision(&transaction, &old_state);
- // TODO: need to start the state with these vals
// HAXX
view.state.old_state = Some((view.state.doc().clone(), view.state.selection.clone()));
}