diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/config.zig | 1 | ||||
| -rw-r--r-- | src/edit.zig | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/config.zig b/src/config.zig index 80c08cce..ecaa3357 100644 --- a/src/config.zig +++ b/src/config.zig @@ -582,6 +582,7 @@ pub const insert_backspace_alias: []const Chord = &.{.{ .cp = 'h', .ctrl = true pub const insert_enter_alias: []const Chord = &.{.{ .cp = 'j', .ctrl = true }}; pub const insert_delete_alias: []const Chord = &.{.{ .cp = 'd', .ctrl = true }}; pub const insert_register: []const Chord = &.{.{ .cp = 'r', .ctrl = true }}; +pub const insert_checkpoint: []const Chord = &.{.{ .cp = 's', .ctrl = true }}; pub const delete_word_backward: []const Chord = &.{ .{ .cp = 'w', .ctrl = true }, .{ .cp = Key.backspace, .alt = true } }; pub const delete_word_forward: []const Chord = &.{ .{ .cp = 'd', .alt = true }, .{ .cp = Key.delete, .alt = true } }; pub const kill_to_line_start: []const Chord = &.{.{ .cp = 'u', .ctrl = true }}; 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 |
