summaryrefslogtreecommitdiff
path: root/src/tui
diff options
context:
space:
mode:
Diffstat (limited to 'src/tui')
-rw-r--r--src/tui/tui.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tui/tui.zig b/src/tui/tui.zig
index d5d3a782..af274b3f 100644
--- a/src/tui/tui.zig
+++ b/src/tui/tui.zig
@@ -380,7 +380,7 @@ const PipeTasks = selection_pipe.Tasks;
const Pty = struct {
file: std.Io.File,
pid: posix.pid_t,
- reader: std.Io.Future(anyerror!void),
+ reader: std.Io.Future(error{OutOfMemory}!void),
/// A command pane's child, watched to its exit (host_io.watchExit);
/// the pty stays open until both its end of file and its exit.
cmd: host_io.CommandWatch = .{},
@@ -1030,7 +1030,7 @@ fn localSession(
core.stream.cancelTask();
file_watch.stop(sh.inotify_fd);
if (sh.watch_task) |*t| {
- t.cancel(io) catch {};
+ t.cancel(io);
sh.watch_task = null;
}
if (sh.inotify_fd >= 0) {
@@ -1196,7 +1196,7 @@ const Shell = struct {
ptys: [pardes.MAX_PANES]?Pty = @splat(null),
gens: [pardes.MAX_PANES]u32 = @splat(0),
watches: file_watch.Table = @splat(null),
- watch_task: ?std.Io.Future(anyerror!void) = null,
+ watch_task: ?std.Io.Future(void) = null,
lsp_task: ?host_io.Lsp.Task = null,
pipe_tasks: PipeTasks = .{},
job_tasks: PipeTasks = .{},
@@ -2223,7 +2223,7 @@ fn lspStatusSink(ctx: ?*anyopaque, text: []const u8) void {
if (!posted) s.lsp_gpa.free(copy);
}
-fn watchFiles(io: std.Io, fd: c_int, loop: *Loop) anyerror!void {
+fn watchFiles(io: std.Io, fd: c_int, loop: *Loop) void {
if (comptime builtin.os.tag != .linux and builtin.os.tag != .freebsd) {
while (file_watch.wait(fd)) loop.postEvent(.files_changed) catch break;
return;
@@ -2325,7 +2325,7 @@ fn tookRead(io: std.Io, id: usize) void {
};
}
-fn readPty(io: std.Io, gpa: std.mem.Allocator, pty: std.Io.File, id: usize, gen: u32, loop: *Loop) anyerror!void {
+fn readPty(io: std.Io, gpa: std.mem.Allocator, pty: std.Io.File, id: usize, gen: u32, loop: *Loop) error{OutOfMemory}!void {
// One buffer, read into directly: a Reader around it only added a second
// (and in a safe build, filled both as `undefined` on every start).
var buf: [0x10000]u8 = undefined;