diff options
Diffstat (limited to 'src/panes.zig')
| -rw-r--r-- | src/panes.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/panes.zig b/src/panes.zig index 1ec78bbc..ffaaba37 100644 --- a/src/panes.zig +++ b/src/panes.zig @@ -893,7 +893,7 @@ pub fn newScratchBelow(p: *Pardes, from_id: usize) void { /// A scratch for New (`.scratch`) or 9P's pane/new (`.fs`). pub fn newScratchFor(p: *Pardes, from_id: usize, kind: exec.NewPane) void { const free = p.freeSlot() orelse return p.reportError(from_id, "New", error.NoPaneSlots); - _ = newScratch(p, from_id, free, kind) catch return; + _ = newScratch(p, from_id, free, kind) catch |err| return p.reportError(from_id, "New", err); exec.placeNew(p, from_id, from_id, free, kind); } @@ -1052,7 +1052,7 @@ pub fn startPrompt(p: *Pardes, pane: *Pane, t: *Text, request: union(enum) { if (request == .save and p.fs.serving) { if (pane.prompt == .save) return; var rec: [32]u8 = undefined; - ctlfs.events.notePath(p, "ask", std.fmt.bufPrint(&rec, "{d} save path", .{pane.serial}) catch ""); + ctlfs.events.notePath(p, "ask", std.fmt.bufPrint(&rec, "{d} save path", .{pane.serial}) catch unreachable); // a u32 } const marker = switch (request) { .search => |marker| marker, @@ -1071,7 +1071,7 @@ pub fn startPrompt(p: *Pardes, pane: *Pane, t: *Text, request: union(enum) { // directory for the name to be typed onto. const dir = if (request == .save) paneDir(pane) else ""; const slash: []const u8 = if (request == .save and (dir.len == 0 or dir[dir.len - 1] != '/')) "/" else ""; - const answer = std.mem.concat(p.gpa, u8, &.{ marker, dir, slash }) catch return; + const answer = std.mem.concat(p.gpa, u8, &.{ marker, dir, slash }) catch |err| return p.reportError(p.view().active, "prompt", err); // The keyboard comes back to the text answered for; a prompt for // the body takes it out of a tag or header. switch (t.what) { |
