summaryrefslogtreecommitdiff
path: root/src/Pipe.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Pipe.zig')
-rw-r--r--src/Pipe.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Pipe.zig b/src/Pipe.zig
index b7310e5c..e7895c0d 100644
--- a/src/Pipe.zig
+++ b/src/Pipe.zig
@@ -179,14 +179,14 @@ fn pipeFailed(p: *Pardes, wait: *const PendingPipe, failure: ?selection_pipe.Fai
w.print("selection {d} of {d}: ", .{ fail.index + 1, wait.inputs.len }) catch return;
writeFailure(w, failure) catch return;
const content = out.toOwnedSlice() catch return;
- const was = p.active;
+ const was = p.view().active;
panes.Output.openErrors(p, wait.pane, content) catch |err| {
p.gpa.free(content);
// Nowhere to put the report is itself worth one line.
p.reportError(wait.pane, "pipe", err);
return;
};
- if (p.panes[was] != null) p.active = was;
+ if (p.panes[was] != null) p.view().active = was;
}
/// How a filter failed, a line, and the command's stderr after it: what
@@ -263,7 +263,7 @@ pub fn pipeResponse(
const t: *Text = switch (wait.what) {
.body => &pane.body,
.tag => &pane.tag,
- .column => if (wait.column < p.ncol) &p.col_tags[wait.column] else return,
+ .column => if (wait.column < p.view().ncol) &p.view().col_tags[wait.column] else return,
.workspace => &p.global_tag,
.input => return,
};
@@ -572,7 +572,7 @@ test "a failed filter opens an errors buffer carrying the command's own words" {
try std.testing.expectEqualSlices(u8, "abc\n", pane.file.?.content);
try std.testing.expectEqual(@as(usize, 0), pane.file.?.history.journal.done);
// ...and the cursor did not go anywhere, so `|` again edits the same file.
- try std.testing.expectEqual(@as(usize, 0), p.active);
+ try std.testing.expectEqual(@as(usize, 0), p.view().active);
var found: ?[]const u8 = null;
for (p.panes) |slot| {