summaryrefslogtreecommitdiff
path: root/helix-term/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/commands')
-rw-r--r--helix-term/src/commands/lsp.rs5
-rw-r--r--helix-term/src/commands/typed.rs6
2 files changed, 7 insertions, 4 deletions
diff --git a/helix-term/src/commands/lsp.rs b/helix-term/src/commands/lsp.rs
index 1113b44e..726aec67 100644
--- a/helix-term/src/commands/lsp.rs
+++ b/helix-term/src/commands/lsp.rs
@@ -596,9 +596,7 @@ pub fn apply_workspace_edit(
}
};
- let doc = editor
- .document_mut(doc_id)
- .expect("Document for document_changes not found");
+ let doc = doc_mut!(editor, &doc_id);
// Need to determine a view for apply/append_changes_to_history
let selections = doc.selections();
@@ -620,6 +618,7 @@ pub fn apply_workspace_edit(
offset_encoding,
);
doc.apply(&transaction, view_id);
+ view_mut!(editor, view_id).apply(&transaction, doc);
doc.append_changes_to_history(view_id);
};
diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs
index 96ff75c5..574e895b 100644
--- a/helix-term/src/commands/typed.rs
+++ b/helix-term/src/commands/typed.rs
@@ -463,6 +463,7 @@ fn set_line_ending(
}),
);
doc.apply(&transaction, view.id);
+ view.apply(&transaction, doc);
doc.append_changes_to_history(view.id);
Ok(())
@@ -884,6 +885,7 @@ fn replace_selections_with_clipboard_impl(
});
doc.apply(&transaction, view.id);
+ view.apply(&transaction, doc);
doc.append_changes_to_history(view.id);
Ok(())
}
@@ -1004,7 +1006,7 @@ fn reload(
let scrolloff = cx.editor.config().scrolloff;
let (view, doc) = current!(cx.editor);
- doc.reload(view.id).map(|_| {
+ doc.reload(view).map(|_| {
view.ensure_cursor_in_view(doc, scrolloff);
})
}
@@ -1399,6 +1401,7 @@ fn sort_impl(
);
doc.apply(&transaction, view.id);
+ view.apply(&transaction, doc);
doc.append_changes_to_history(view.id);
Ok(())
@@ -1443,6 +1446,7 @@ fn reflow(
});
doc.apply(&transaction, view.id);
+ view.apply(&transaction, doc);
doc.append_changes_to_history(view.id);
view.ensure_cursor_in_view(doc, scrolloff);