diff options
Diffstat (limited to 'dev')
| -rw-r--r-- | dev/lsp/lsp_client.zig | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/dev/lsp/lsp_client.zig b/dev/lsp/lsp_client.zig index 83aea44f..4ad8dace 100644 --- a/dev/lsp/lsp_client.zig +++ b/dev/lsp/lsp_client.zig @@ -783,8 +783,13 @@ fn answer(io: std.Io, arena: std.mem.Allocator, si: usize, req: lsp.Req, out: *s if (!try timedWait(c, io, startup_deadline)) break; } if (starting or c.loading or c.progress > 0) { - tr.note("{s} is still loading: waiting for it, then asking again", .{specs[si].name}); - post(si, .always, "{s} is still loading the workspace; the answer comes when it is done\u{2026}", .{specs[si].name}); + // Said only when the server says it: a startup window that ran + // out with no word of loading is asked again quietly, and the + // message row keeps what it had (an empty answer is an answer). + if (c.loading or c.progress > 0) { + tr.note("{s} is still loading: waiting for it, then asking again", .{specs[si].name}); + post(si, .always, "{s} is still loading the workspace; the answer comes when it is done\u{2026}", .{specs[si].name}); + } while ((c.loading or c.progress > 0) and c.gen == g and c.alive()) _ = try timedWait(c, io, nowMs() + 500); out.end = before; try attempt(c, io, si, arena, req, out, tr, g); |
