From 686673bfb67ac80ed464351528d9ab1bceaa1d02 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 16:41:26 -0300 Subject: Insert Ctrl-s commits an undo checkpoint mid-session helix commit_undo_checkpoint: u after the insert session goes back to the text as it was at Ctrl-s, a second u to before the session. It pushes an undo snapshot where the session stands. Co-Authored-By: Claude Opus 5.5 --- src/edit.zig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/edit.zig') diff --git a/src/edit.zig b/src/edit.zig index 9398674a..39050b9d 100644 --- a/src/edit.zig +++ b/src/edit.zig @@ -656,6 +656,8 @@ pub fn insertKey(p: *Pardes, t: *Text, key: Key) void { t.reg_wait = true; return; } + // helix commit_undo_checkpoint: `u` after the session goes back to here + if (hit(key, config.insert_checkpoint)) return pushUndo(p, t); // helix maps every range through each insert-mode edit (Range::map): // the edits below work on the bare cursor, and the range the cursor // heads is carried through what they did to the text afterwards -- cgit v1.3