summaryrefslogtreecommitdiff
path: root/src/Core.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Core.zig')
-rw-r--r--src/Core.zig20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/Core.zig b/src/Core.zig
index 7d8cfb0e..a3ace8f9 100644
--- a/src/Core.zig
+++ b/src/Core.zig
@@ -208,9 +208,6 @@ db: Db = .{},
/// (`stdio.h`, `<foo.h>`) is tried in, in order. The session's, seeded
/// with C's (/usr/include, /usr/local/include), kept in a dump.
incl: std.ArrayList([]u8) = .empty,
-/// Plumb's rules, the user's, tried in order before the built-in ones
-/// (look.resolve), the first to match taking the look. Kept in a dump.
-plumb: std.ArrayList([]u8) = .empty,
/// The plumber's rules (Plumb.zig): plumb/rules and plumb/send's, the
/// defaults (`include basic`) until something writes others. Kept in a dump.
plumber: Plumb = .{},
@@ -230,9 +227,11 @@ next_serial: u32 = 0,
/// The column whose tag the running command came from, while it runs:
/// the column acme's commands take from their Text's col.
exec_column: ?usize = null,
-/// The directory a `plumb start`'s command runs in, while it runs
-/// (Plumb.run): the message's wdir, which no pane need have.
-exec_dir: ?[]const u8 = null,
+/// While a word a plumbing rule started runs (Plumb.run): whether it
+/// declined the message, saying nothing (Diff on a file with no hunk, a
+/// revision outside a git work tree), so that the send is refused and a
+/// look looks itself. Null while no rule's word runs.
+plumb_declined: ?bool = null,
/// Panes made this step that found no room in their column
/// (layout.placeNew): closed at the step's end, once whatever made them
/// is done with them.
@@ -273,8 +272,10 @@ unattended: bool = false,
haptic: HapticSlot = if (platform == .macos) .none else {},
/// The look just run found nothing (look.zig missed).
look_missed: bool = false,
-/// The look being run opens a .diff or .patch as text, not its +Diff:
-/// Diff going back from a +Diff, Edit's B (it edits the file).
+/// The look being run opens what it names, unplumbed (Plumb.zig): a
+/// .diff as text, not stacked in a +Diff (Diff going back from a +Diff,
+/// Edit's B, which edits the file), and the `edit` port's open of a
+/// message the plumber already matched.
look_text: bool = false,
look_hover_wait: ?look.LookHoverWait = null,
/// The place a look-hover last found nothing to open: the pointer
@@ -763,8 +764,6 @@ pub fn deinit(p: *Pardes) void {
p.recent.deinit(p.recentGpa());
for (p.incl.items) |dir| p.gpa.free(dir);
p.incl.deinit(p.gpa);
- for (p.plumb.items) |rule| p.gpa.free(rule);
- p.plumb.deinit(p.gpa);
p.plumber.deinit(p.gpa);
for (p.twin_groups.items) |group| p.gpa.free(group.path);
p.twin_groups.deinit(p.gpa);
@@ -1719,7 +1718,6 @@ fn processDir(buf: *[limits.host_path_cap]u8) ?[]const u8 {
/// The directory a word run from pane `id`'s text or tag runs in, or,
/// from a header, the session's.
pub fn execDir(p: *Pardes, id: usize) []const u8 {
- if (p.exec_dir) |dir| return dir;
if (p.exec_header) return p.sessionDir();
return paneDir(p.panes[id] orelse return p.sessionDir());
}