diff options
Diffstat (limited to 'src/tui/tui.zig')
| -rw-r--r-- | src/tui/tui.zig | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/tui/tui.zig b/src/tui/tui.zig index 05d29272..1e4b238e 100644 --- a/src/tui/tui.zig +++ b/src/tui/tui.zig @@ -1949,7 +1949,7 @@ const Shell = struct { const s = of(ctx); if (s.waited) { s.waited = false; - if (s.mail_only and s.peers.count() > 0 and s.core.clock_started) return s.core.now_ns; + if (s.mail_only and s.peers.count() > 0 and s.core.clock.started) return s.core.clock.now_ns; } return s.test_clock orelse @intCast(std.Io.Clock.awake.now(s.io).nanoseconds); } @@ -2286,7 +2286,7 @@ const Shell = struct { if (wait != 0) { // A virtual clock moves a frame a wake while the tty's own // motions move (the glide), as the real one would. - s.wake_to = s.core.nextWake() orelse if (s.moving()) s.core.now_ns + pardes.frame_ns else 0; + s.wake_to = s.core.nextWake() orelse if (s.moving()) s.core.clock.now_ns + pardes.frame_ns else 0; requestWake(s.io, wait); } pardes.turn.rest(); @@ -2958,17 +2958,17 @@ test "TTY queued results reject old PTY generations and LSP request IDs" { try std.testing.expect(std.mem.indexOf(u8, text, "current session") != null); core.lspRequest(0, .status, ""); - const old_id = core.lsp_wait.?.id; + const old_id = core.lsp_ask.wait.?.id; core.lspRequest(0, .status, ""); - const current_id = core.lsp_wait.?.id; + const current_id = core.lsp_ask.wait.?.id; shell.lsp_task = .{ .id = current_id, .future = .{ .any_future = null, .result = {} } }; _ = shell.apply(.{ .lsp_done = .{ .id = old_id, .rows = try gpa.dupe(u8, "stale result\n") } }); try std.testing.expect(shell.lsp_task != null); try std.testing.expectEqual(current_id, shell.lsp_task.?.id); - try std.testing.expectEqual(current_id, core.lsp_wait.?.id); + try std.testing.expectEqual(current_id, core.lsp_ask.wait.?.id); _ = shell.apply(.{ .lsp_done = .{ .id = current_id, .rows = try gpa.dupe(u8, "") } }); try std.testing.expect(shell.lsp_task == null); - try std.testing.expect(core.lsp_wait == null); + try std.testing.expect(core.lsp_ask.wait == null); } test "TTY worker setup failures finish matching LSP and pipe requests" { @@ -2997,14 +2997,14 @@ test "TTY worker setup failures finish matching LSP and pipe requests" { }; core.lspRequest(core.active, .status, ""); const req: host_io.Lsp.Request = .{ - .id = core.lsp_wait.?.id, + .id = core.lsp_ask.wait.?.id, .kind = .status, .pane = @intCast(core.active), .offset = 0, .arg = "", }; Shell.lsp(&shell, req); - try std.testing.expect(core.lsp_wait == null); + try std.testing.expect(core.lsp_ask.wait == null); try std.testing.expectEqualStrings("abc", pane.file.?.content); pane.body.cur_col = 2; |
