summaryrefslogtreecommitdiff
path: root/src/macos.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/macos.zig')
-rw-r--r--src/macos.zig7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/macos.zig b/src/macos.zig
index f2e68a85..9d4f6039 100644
--- a/src/macos.zig
+++ b/src/macos.zig
@@ -2238,7 +2238,7 @@ fn spawnShell(ctx: ?*anyopaque, pane: u8, cwd: []const u8) void {
fn ptyWrite(ctx: ?*anyopaque, pane: u8, bytes: []const u8) void {
const st = hostState(ctx);
- if (st.ptys[pane]) |pt| host_io.writeFd(pt.file.handle, bytes);
+ if (st.ptys[pane]) |pt| _ = host_io.writeFd(pt.file.handle, bytes);
}
fn ptyResize(ctx: ?*anyopaque, pane: u8, cols: u16, rows: u16) void {
@@ -2271,7 +2271,8 @@ fn ttyTaken(ctx: ?*anyopaque, pane: u8) bool {
/// resolved which path and which bytes.
fn writeFile(ctx: ?*anyopaque, pane: u8, path: []const u8, bytes: []const u8) void {
const st = hostState(ctx);
- if (!host_io.writeFileBytes(path, bytes)) return;
+ host_io.writeFileBytes(path, bytes) catch |err|
+ return st.core.saveFailed(pane, "save", err);
// The directory source will observe our own close. Move its baseline first
// so that notification is a hash no-op instead of manufacturing an external
// reload and undo boundary.
@@ -2286,7 +2287,7 @@ fn writeDump(ctx: ?*anyopaque, bytes: []const u8) void {
const st = hostState(ctx);
var pbuf: [1024:0]u8 = undefined;
const path = pardes.dump.outPath(&pbuf) orelse return;
- if (!host_io.writeFileBytes(path, bytes)) return;
+ host_io.writeFileBytes(path, bytes) catch |err| return st.core.reportError(0, "dump", err);
st.core.setLastDump(path);
}