diff options
Diffstat (limited to 'core/edit.zig')
| -rw-r--r-- | core/edit.zig | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/edit.zig b/core/edit.zig index d91620c4..214e83a8 100644 --- a/core/edit.zig +++ b/core/edit.zig @@ -110,7 +110,7 @@ pub fn clipRequest(p: *Pardes, id: usize, mode: Paste) void { /// (Term.paste). pub fn typeToTty(p: *Pardes, id: usize, pane: *const Pane, text: []const u8) void { if (text.len == 0) return; - const cp = p.scratch.allocator().dupe(u8, text) catch |err| return p.reportError(id, "paste", err); + const cp = p.scratch.allocator().dupe(u8, text) catch |err| return p.reportError(.at(id), "paste", err); for (panes.Term.paste(pane.terminal, cp)) |part| if (part.len > 0) p.emitWrite(id, part); } @@ -122,7 +122,7 @@ pub fn applyPaste(p: *Pardes, whole: []const u8) Error!void { const bytes = if (whole.len > limit) whole[0..modal.graphemeStart(whole, limit)] else whole; if (whole.len > limit) { var said: pardes.Kind.Buf(96) = .{}; - p.setMessage(v.active, said.print("paste cut at its limit, {d} KiB: the rest left out", .{limit / 1024})); + p.setMessage(.at(v.active), said.print("paste cut at its limit, {d} KiB: the rest left out", .{limit / 1024})); } // A prompt answering for a header takes the paste, as it takes keys. const asking = if (p.panes[v.active]) |active| active.prompt != .none else false; @@ -184,7 +184,7 @@ pub fn clipYank(p: *Pardes, pane: *Pane, main_only: bool) void { defer v.register = named; // A kind's pane: what it has selected (Kind.Slot.selection). if (pane.addon) |k| { - if (k.selection.len > 0) setYank(p.editor(), k.selection) catch |err| p.reportError(p.view().active, "yank", err); + if (k.selection.len > 0) setYank(p.editor(), k.selection) catch |err| p.reportError(.at(p.view().active), "yank", err); return; } if (pane.body.nsel > 0 and !main_only) { @@ -192,7 +192,7 @@ pub fn clipYank(p: *Pardes, pane: *Pane, main_only: bool) void { } else { const others = pane.body.nsel; pane.body.nsel = 0; - normalYank(p.editor(), &pane.body) catch |err| p.reportError(p.view().active, "edit", err); + normalYank(p.editor(), &pane.body) catch |err| p.reportError(.at(p.view().active), "edit", err); pane.body.nsel = others; } } @@ -643,7 +643,7 @@ fn editText(e: Editor, t: *Text, lo: i32, hi: i32, col: i32) Error!?panes.EditTe // with Tab or B2, gone when the program draws again. Said at its first // edit, so it never looks like an edit that was lost. if (fresh) for (e.p.panes, 0..) |slot, id| if (slot == pane) - e.p.setMessage(id, "a copy of the terminal's text: Tab or B2 runs it; what the program draws next replaces it (Ctrl-b types to the program)"); + e.p.setMessage(.at(id), "a copy of the terminal's text: Tab or B2 runs it; what the program draws next replaces it (Ctrl-b types to the program)"); return .{ .text = pane.ovl.?.text, .row0 = pane.ovl.?.row }; } |
