summaryrefslogtreecommitdiff
path: root/src/ninep
diff options
context:
space:
mode:
Diffstat (limited to 'src/ninep')
-rw-r--r--src/ninep/ctl.zig16
-rw-r--r--src/ninep/pane.zig6
2 files changed, 11 insertions, 11 deletions
diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig
index dc95e0ec..04ac1cbf 100644
--- a/src/ninep/ctl.zig
+++ b/src/ninep/ctl.zig
@@ -2118,23 +2118,23 @@ test "a language server question that finds nothing, cannot be answered, or is a
// Nothing found: Callers says so, and the waiting write hears it.
p.fs.late_failure_len = 0;
p.lspRequest(id, .incoming_calls, "");
- try testing.expect(p.lsp_wait != null);
- Ask.lspResponse(p, p.lsp_wait.?.id, "");
+ try testing.expect(p.lsp_ask.wait != null);
+ Ask.lspResponse(p, p.lsp_ask.wait.?.id, "");
try testing.expectEqualStrings("Callers: callers not found", p.fs.late_failure[0..p.fs.late_failure_len]);
// A backend that cannot answer says why.
p.fs.late_failure_len = 0;
p.lspRequest(id, .outgoing_calls, "");
- Ask.lspResponse(p, p.lsp_wait.?.id, "@none zls does not answer call hierarchy\n");
+ Ask.lspResponse(p, p.lsp_ask.wait.?.id, "@none zls does not answer call hierarchy\n");
try testing.expectEqualStrings("Callees: zls does not answer call hierarchy", p.fs.late_failure[0..p.fs.late_failure_len]);
// No answer at all.
p.fs.late_failure_len = 0;
p.lspRequest(id, .hover, "");
- Ask.lspResponse(p, p.lsp_wait.?.id, null);
+ Ask.lspResponse(p, p.lsp_ask.wait.?.id, null);
try testing.expectEqualStrings("Hover: the language server did not answer", p.fs.late_failure[0..p.fs.late_failure_len]);
// No diagnostics is no failure.
p.fs.late_failure_len = 0;
p.lspRequest(id, .diagnostics, "");
- Ask.lspResponse(p, p.lsp_wait.?.id, "");
+ Ask.lspResponse(p, p.lsp_ask.wait.?.id, "");
try testing.expectEqual(@as(u16, 0), p.fs.late_failure_len);
// An image's body takes no write.
const slot = p.freeSlot().?;
@@ -2803,7 +2803,7 @@ test "a Rename that reaches other files previews them, says so, and is the pane
const id = p.active;
p.fs.lsp_result = null;
p.lspRequest(id, .rename, "sum");
- Ask.lspResponse(p, p.lsp_wait.?.id, "lib.rs:2:8 sum\nmain.rs:4:13-15 sum\n");
+ Ask.lspResponse(p, p.lsp_ask.wait.?.id, "lib.rs:2:8 sum\nmain.rs:4:13-15 sum\n");
const preview = p.panes[p.panes[id].?.search_pane.?].?;
try testing.expectEqual(preview.serial, p.fs.lsp_result.?);
try testing.expect(th.logHas(p, "Rename: 2 edit(s) across files, previewed, not applied"));
@@ -2850,7 +2850,7 @@ test "a Rename the server answered for this file alone, with other open files sa
const p = try withFile(testing.allocator, "x\n");
defer p.deinit();
p.lspRequest(p.active, .rename, "sum");
- Ask.lspResponse(p, p.lsp_wait.?.id, "util.zig:1:8 sum\nmain.zig: also says add, which the server did not rename\n");
+ Ask.lspResponse(p, p.lsp_ask.wait.?.id, "util.zig:1:8 sum\nmain.zig: also says add, which the server did not rename\n");
try testing.expect(th.logHas(p, "Rename: previewed, not applied: the server renamed in this file only, and 1 other open file(s) say the name"));
}
@@ -2890,7 +2890,7 @@ test "Lspinfo's answer is the +Lsp pane it fills, as a Rename preview's is its +
defer p.deinit();
p.fs.lsp_result = null;
p.lspRequest(p.active, .status, "");
- Ask.lspResponse(p, p.lsp_wait.?.id, "language servers:\n");
+ Ask.lspResponse(p, p.lsp_ask.wait.?.id, "language servers:\n");
const shown = p.paneBySerial(p.fs.lsp_result.?).?;
try testing.expect(std.mem.endsWith(u8, p.panes[shown].?.file.?.path, "+Lsp"));
}
diff --git a/src/ninep/pane.zig b/src/ninep/pane.zig
index ab4b2d7d..4595d02d 100644
--- a/src/ninep/pane.zig
+++ b/src/ninep/pane.zig
@@ -564,7 +564,7 @@ pub const batch_pause_ns: u64 = 20 * std.time.ns_per_ms;
pub fn flushPausedBatch(p: *Pardes) void {
const b = &p.fs.batch;
if (b.bytes.items.len == 0) return;
- if (p.now_ns != 0 and p.now_ns -| b.last_ns < batch_pause_ns) return;
+ if (p.clock.now_ns != 0 and p.clock.now_ns -| b.last_ns < batch_pause_ns) return;
flushBatch(p);
}
@@ -606,7 +606,7 @@ fn holdWrite(p: *Pardes, req: Req, pane: *Pane, at: usize) error{OutOfMemory}!?u
if (b.bytes.items.len == 0) b.* = .{ .serial = pane.serial, .node = req.node, .handle = req.handle, .at = at, .bytes = b.bytes };
const take = wholeUtf8(req.data);
try b.bytes.appendSlice(p.gpa, req.data[0..take]);
- b.last_ns = p.now_ns;
+ b.last_ns = p.clock.now_ns;
return take;
}
@@ -1083,7 +1083,7 @@ test "writes held before the shell's clock is first seen go in at its first step
const p = try withFile(testing.allocator, "one\n");
defer p.deinit();
const body = Node.of(serialOf(p), .body);
- try testing.expect(!p.clock_started);
+ try testing.expect(!p.clock.started);
const h = call(p, .{ .tag = 1, .op = .open, .node = body, .omode = 1 }).reply.handle;
const revision = p.panes[0].?.file.?.revision;
_ = call(p, .{ .tag = 2, .op = .write, .node = body, .handle = h, .data = "x\n" });