summaryrefslogtreecommitdiff
path: root/core/builtins.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-24 19:37:15 -0300
committerGabriel Schneider <[email protected]>2026-11-24 19:38:18 -0300
commit480f36b85299fa7407c20a2d6482dd093f842bf7 (patch)
tree5d07c37c3e4eae82ec35ed100799d5810a8912aa /core/builtins.zig
parentf44d1b7d040acf674814be3cde336527833450e9 (diff)
parent9f63733156853c925c31a948b50d4a3a7b77aa70 (diff)
downloadpardes-480f36b85299fa7407c20a2d6482dd093f842bf7.tar.gz
pardes-480f36b85299fa7407c20a2d6482dd093f842bf7.zip
walk UI wave-2 base: line A items 1-4 (kquzozvs) merged with line B items 1-5 (mqmtqvtt)
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.
///