aboutsummaryrefslogtreecommitdiff
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.rs8
2 files changed, 7 insertions, 6 deletions
diff --git a/helix-term/src/commands/lsp.rs b/helix-term/src/commands/lsp.rs
index 8faf1d08..1f80de5f 100644
--- a/helix-term/src/commands/lsp.rs
+++ b/helix-term/src/commands/lsp.rs
@@ -760,8 +760,9 @@ pub fn apply_workspace_edit(
text_edits,
offset_encoding,
);
- apply_transaction(&transaction, doc, view_mut!(editor, view_id));
- doc.append_changes_to_history(view_id);
+ let view = view_mut!(editor, view_id);
+ apply_transaction(&transaction, doc, view);
+ doc.append_changes_to_history(view);
};
if let Some(ref changes) = workspace_edit.changes {
diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs
index 89c310fa..2fa903a7 100644
--- a/helix-term/src/commands/typed.rs
+++ b/helix-term/src/commands/typed.rs
@@ -464,7 +464,7 @@ fn set_line_ending(
}),
);
apply_transaction(&transaction, doc, view);
- doc.append_changes_to_history(view.id);
+ doc.append_changes_to_history(view);
Ok(())
}
@@ -909,7 +909,7 @@ fn replace_selections_with_clipboard_impl(
});
apply_transaction(&transaction, doc, view);
- doc.append_changes_to_history(view.id);
+ doc.append_changes_to_history(view);
Ok(())
}
Err(e) => Err(e.context("Couldn't get system clipboard contents")),
@@ -1573,7 +1573,7 @@ fn sort_impl(
);
apply_transaction(&transaction, doc, view);
- doc.append_changes_to_history(view.id);
+ doc.append_changes_to_history(view);
Ok(())
}
@@ -1617,7 +1617,7 @@ fn reflow(
});
apply_transaction(&transaction, doc, view);
- doc.append_changes_to_history(view.id);
+ doc.append_changes_to_history(view);
view.ensure_cursor_in_view(doc, scrolloff);
Ok(())