diff options
Diffstat (limited to 'dev/gui/gui.zig')
| -rw-r--r-- | dev/gui/gui.zig | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/dev/gui/gui.zig b/dev/gui/gui.zig index 59e0516a..df3d2f2b 100644 --- a/dev/gui/gui.zig +++ b/dev/gui/gui.zig @@ -1047,11 +1047,9 @@ const Own = struct { const io = l.io; o.shell.fs = null; host_io.setExitWake(null, null); - pardes.lsp.setStatusSink(null, null); pardes.Kind.drawer = null; o.shell.job_tasks.cancelAll(io); o.pipe_tasks.cancelAll(io); - if (l.inbox.lsp_task) |*task| task.future.cancel(io); // Its worker may be waiting on the queue for room. l.core.stream.cancelTask(); o.g.hit_core = null; @@ -1066,7 +1064,6 @@ const Own = struct { if (o.test_mode) setStdinRaw() catch {}; o.shell.threads_ok = true; - pardes.lsp.setStatusSink(&l.inbox, Queue.lspStatus); host_io.setExitWake(&l.inbox, Queue.wakeForExit); if (o.detached) { o.shell.closeTheWindow(); @@ -1087,7 +1084,6 @@ const Own = struct { pub fn restoring(o: *Own, nc: *pardes.Pardes) void { o.pipe_tasks.cancelAll(o.shell.io); - o.shell.queue.discardCompletions(); // One view, the window's (host_io.restoreCore). o.shell.gview = 0; o.g.cells.clearImages(); @@ -2601,15 +2597,7 @@ const Shell = struct { for (msgs.slice()) |m| switch (m) { .output => |o| s.ptys.output(s.core, o), .eof => |e| s.ptys.eof(s.core, e), - .lsp => |l| { - s.core.update(.{ .lsp_resp = .{ .id = l.id, .rows = l.rows } }); - if (l.rows) |rows| s.lsp_allocator.free(rows); - }, - .lsp_status => |text| { - var mbuf: [256]u8 = undefined; - s.core.setStatus(.at(s.core.view().active), message.stamp(&mbuf, "lsp", text)); - s.lsp_allocator.free(text); - }, + .lsp, .lsp_status => s.queue.landLsp(s.core, m), .pipe => |response_value| { var response = response_value; s.core.update(.{ .pipe_resp = .{ |
