summaryrefslogtreecommitdiff
path: root/src/dump.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-07-31 00:52:02 -0300
committerGabriel Schneider <[email protected]>2026-08-01 15:02:08 -0300
commita77e342eb7fa4add700a96a661226649e8c4763f (patch)
tree3ad4978cca350090463e58840dc94404ea8a1a33 /src/dump.zig
parentea228d1b832401db8efe33a5db4099ba41d42509 (diff)
downloadpardes-a77e342eb7fa4add700a96a661226649e8c4763f.tar.gz
pardes-a77e342eb7fa4add700a96a661226649e8c4763f.zip
output panes remember the command that opened them
An output buffer was a file pane with a flag, and everything special about it was re-derived from outside by asking the wrong question: the buffer NAME ("+Search", "+Help"), a parallel search_kind field, and f.output predicates sprinkled through kind-agnostic code. Now it carries its Origin — the Builtin, or the lsp.Kind for the five gotos helix binds as motions rather than words — plus that command's argument, and one Traits table answers every question the scattered code used to ask: what it is called, whether n/N steps it, whether it is a doc for layout, whether Esc dismisses it, whether it saves. The name is derived FROM the command instead of being the thing that identifies it. Adding a kind of output pane is adding a row. No golden moved.
Diffstat (limited to 'src/dump.zig')
-rw-r--r--src/dump.zig9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/dump.zig b/src/dump.zig
index 51221197..0f8cb810 100644
--- a/src/dump.zig
+++ b/src/dump.zig
@@ -68,8 +68,13 @@ pub const File = struct {
path: []const u8 = "",
content: []const u8 = "",
content_b64: []const u8 = "",
- /// an output buffer (no file behind the name) — see pardes.File.output
- output: bool = false,
+ /// non-empty = an output buffer (no file behind the name): the WORD of the
+ /// command that opened it, plus that command's argument — see
+ /// output_pane.Origin. A word rather than an integer for the reason every
+ /// other command in here is a word: reordering builtins.zig stays free,
+ /// and a dump stays something a person can read.
+ origin: []const u8 = "",
+ origin_arg: []const u8 = "",
};
pub const Image = struct {