summaryrefslogtreecommitdiff
path: root/helix-term/src/commands.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/commands.rs')
-rw-r--r--helix-term/src/commands.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 54dcc98f..e2d10d21 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -318,6 +318,7 @@ impl MappableCommand {
redo, "Redo change",
earlier, "Move backward in history",
later, "Move forward in history",
+ commit_undo_checkpoint, "Commit changes to a new checkpoint",
yank, "Yank selection",
yank_joined_to_clipboard, "Join and yank selections to clipboard",
yank_main_selection_to_clipboard, "Yank main selection to clipboard",
@@ -3001,6 +3002,11 @@ fn later(cx: &mut Context) {
}
}
+fn commit_undo_checkpoint(cx: &mut Context) {
+ let (view, doc) = current!(cx.editor);
+ doc.append_changes_to_history(view.id);
+}
+
// Yank / Paste
fn yank(cx: &mut Context) {