summaryrefslogtreecommitdiff
path: root/src/exec.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-01 17:48:02 -0300
committerGabriel Schneider <[email protected]>2026-10-01 18:08:12 -0300
commit8c74f9a8f199ea0c2d20cc524358d224ea192005 (patch)
treed2a280eb296ad1dce02c9f8e3e8fad20a927edf8 /src/exec.zig
parentafec162464d360cbbf475d3fb7457cda83ce918f (diff)
downloadpardes-8c74f9a8f199ea0c2d20cc524358d224ea192005.tar.gz
pardes-8c74f9a8f199ea0c2d20cc524358d224ea192005.zip
Get reads a pane's file again, refusing unsaved edits once as Del does, and Get file loads that file into the pane; in a directory pane it reads the directory again. Load is Restore, as Put is Save; Abort's refusal says it is acme's debugging word
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/exec.zig')
-rw-r--r--src/exec.zig11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/exec.zig b/src/exec.zig
index 92fb6244..30a1a894 100644
--- a/src/exec.zig
+++ b/src/exec.zig
@@ -943,21 +943,20 @@ pub fn namesBuiltin(txt: []const u8) bool {
pub const acme_words = [_]struct { acme: []const u8, pardes: ?[]const u8, hint: []const u8 = "" }{
.{ .acme = "Put", .pardes = "Save" },
.{ .acme = "Delete", .pardes = "Del" },
- .{ .acme = "Get", .pardes = null, .hint = ": write get to the pane's ctl" },
.{ .acme = "Putall", .pardes = null, .hint = ": Save each pane" },
.{ .acme = "Snarf", .pardes = null, .hint = ": y yanks the selection" },
.{ .acme = "Cut", .pardes = null, .hint = ": d deletes the selection into a register" },
.{ .acme = "Paste", .pardes = null, .hint = ": p puts a register" },
.{ .acme = "Zerox", .pardes = null },
.{ .acme = "Sort", .pardes = null },
- .{ .acme = "Load", .pardes = null, .hint = ": Restore loads a dump" },
+ .{ .acme = "Load", .pardes = "Restore" },
.{ .acme = "ID", .pardes = null },
.{ .acme = "Send", .pardes = null },
.{ .acme = "Tab", .pardes = null },
.{ .acme = "Indent", .pardes = null },
.{ .acme = "Local", .pardes = null },
.{ .acme = "Incl", .pardes = null },
- .{ .acme = "Abort", .pardes = null },
+ .{ .acme = "Abort", .pardes = null, .hint = ": a debugging word that crashes acme" },
};
pub fn executeBuiltinLine(p: *Pardes, id: usize, txt: []const u8) bool {
@@ -968,12 +967,6 @@ pub fn executeBuiltinLine(p: *Pardes, id: usize, txt: []const u8) bool {
var renamed: [1024 + 16]u8 = undefined;
const cmd = for (acme_words) |w| {
if (!std.mem.eql(u8, raw[0..word_end], w.acme)) continue;
- // Get in a directory pane, its tag or its text: the directory read
- // again (Dir.zig), as acme's Get is in a directory window.
- if (std.mem.eql(u8, w.acme, "Get")) if (p.panes[id]) |pane| if (pane.file) |f| if (f.listing != null) {
- panes.Dir.show(p, id, id);
- return true;
- };
const now = w.pardes orelse {
var said: [128]u8 = undefined;
p.reportFailure(id, std.fmt.bufPrint(&said, "invalid: acme's {s} is not a pardes builtin{s}", .{ w.acme, w.hint }) catch "invalid: an acme word pardes has not");