diff options
Diffstat (limited to 'core/hunks.zig')
| -rw-r--r-- | core/hunks.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/hunks.zig b/core/hunks.zig index a7d8e6cb..837d2a52 100644 --- a/core/hunks.zig +++ b/core/hunks.zig @@ -625,7 +625,7 @@ pub fn word(c: pardes.builtins.Ctx) void { if (diffSource(p, f)) |source| return showDiffText(p, c.id, source); _ = openDiff(p, c.id, f.path, f.content) catch |err| switch (err) { error.NoHunks => p.reportFailure(c.id, "Diff: no hunk in it"), - else => p.reportError(c.id, "hunks", err), + else => p.reportError(.at(c.id), "hunks", err), }; return; } @@ -647,14 +647,14 @@ pub fn word(c: pardes.builtins.Ctx) void { const path = if (arg[0] == '/') arg else std.fmt.bufPrint(&buf, "{s}/{s}", .{ std.mem.trimEnd(u8, Pardes.paneDir(c.pane), "/"), arg }) catch arg; const bytes = pardes.filesystem.read(p, path) catch |err| { if (p.plumb_declined != null) return declined(p, c.id, ""); - return p.reportError(c.id, path, err); + return p.reportError(.at(c.id), path, err); }; defer p.gpa.free(bytes); p.view().active = openDiff(p, c.id, path, bytes) catch |err| switch (err) { error.NoHunks => return declined(p, c.id, "Diff: no hunk in it"), else => { if (p.plumb_declined != null) return declined(p, c.id, ""); - return p.reportError(c.id, "hunks", err); + return p.reportError(.at(c.id), "hunks", err); }, }; } @@ -685,7 +685,7 @@ pub fn paged(p: *Pardes, id: usize) void { const keyboard = p.view().active; if (openDiff(p, id, f.path, f.content)) |hid| { // ponytail: the text is gone with it; Diff on the +Diff says no such file. - p.removePane(id, hid) catch |err| p.reportError(id, "pager", err); + p.removePane(id, hid) catch |err| p.reportError(.at(id), "pager", err); } else |_| {} if (p.panes[keyboard] != null) p.view().active = keyboard; } |
