summaryrefslogtreecommitdiff
path: root/core/builtins.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/builtins.zig')
-rw-r--r--core/builtins.zig11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/builtins.zig b/core/builtins.zig
index a236b0d6..12ab9da5 100644
--- a/core/builtins.zig
+++ b/core/builtins.zig
@@ -1998,6 +1998,17 @@ pub const Forward = struct {
}
};
+/// Keep this pane: a reading pane, which a jump steps, is held from now on.
+///
+/// Its walk leaves its tag (its places, its owner): the next jump from its
+/// owner makes a new reader. Editing a reading pane keeps it too.
+pub const Keep = struct {
+ pub fn run(c: Ctx) void {
+ if (!pardes.Trail.reading(c.p, c.pane)) return c.p.setMessage(.at(c.id), "Keep: this pane is held already");
+ pardes.Trail.keep(c.pane);
+ }
+};
+
/// Select the next thing a Look would open: a place in a list, a word that
/// names a file.
///