summaryrefslogtreecommitdiff
path: root/src/Query.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Query.zig')
-rw-r--r--src/Query.zig14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Query.zig b/src/Query.zig
index 7347b21c..9865001b 100644
--- a/src/Query.zig
+++ b/src/Query.zig
@@ -1422,7 +1422,7 @@ fn makeListRows(p: *Pardes, id: usize, pat: []const u8) !void {
const owner = p.panes[oid].?;
// Current: the first place after where it was asked (the answer
// may come after the cursor moved), shown in the owner.
- const asked_at: usize = if (p.lsp_last) |last| (if (last.serial == owner.serial) last.offset else owner.places.origin(owner)) else owner.places.origin(owner);
+ const asked_at: usize = if (p.lsp_ask.last) |last| (if (last.serial == owner.serial) last.offset else owner.places.origin(owner)) else owner.places.origin(owner);
const hits = owner.places.hits.items;
var next: ?usize = null;
for (hits, 0..) |h, i| if (h.start > asked_at) {
@@ -1814,7 +1814,7 @@ pub fn land(p: *Pardes, id: usize, row: ?usize) void {
p.registers.last_search = '/';
set.provenance = .search;
}
- p.jump_force = true;
+ p.jumps.force = true;
p.active = oid;
return;
}
@@ -1829,7 +1829,7 @@ pub fn land(p: *Pardes, id: usize, row: ?usize) void {
};
const it = q.items.items[c];
const meta = f.location_rows[c + 1];
- p.jump_force = true;
+ p.jumps.force = true;
if (it.serial != 0) {
if (p.paneBySerial(it.serial)) |tid| {
p.active = tid;
@@ -2323,7 +2323,7 @@ fn leader(p: *Pardes, keys: []const u8) void {
fn settle(p: *Pardes) void {
// a typed Grep's pause run out on the clock
- p.advance(p.now_ns + Stream.debounce_ns + std.time.ns_per_ms);
+ p.advance(p.clock.now_ns + Stream.debounce_ns + std.time.ns_per_ms);
var frames: usize = 0;
while (busy(p) and frames < 2000) : (frames += 1) p.update(.tick);
p.update(.tick);
@@ -2492,7 +2492,7 @@ test "a language server's list: one answer lands with no pane, several open the
}.of;
// One: the keyboard on it, no pane, the place tinted and n's.
p.lspRequest(0, .references, "");
- p.update(.{ .lsp_resp = .{ .id = p.lsp_wait.?.id, .rows = "/test.txt:3:1-5 alpha two\n" } });
+ p.update(.{ .lsp_resp = .{ .id = p.lsp_ask.wait.?.id, .rows = "/test.txt:3:1-5 alpha two\n" } });
try std.testing.expectEqual(@as(usize, 1), npanes(p));
try std.testing.expectEqual(@as(usize, 0), p.active);
try std.testing.expectEqual(@as(i32, 2), pane.body.cur_row);
@@ -2500,7 +2500,7 @@ test "a language server's list: one answer lands with no pane, several open the
try std.testing.expectEqual(Places.Hit{ .start = 15, .end = 20 }, pane.places.hits.items[0]);
// None: a message, no pane.
p.lspRequest(0, .diagnostics, "");
- p.update(.{ .lsp_resp = .{ .id = p.lsp_wait.?.id, .rows = "" } });
+ p.update(.{ .lsp_resp = .{ .id = p.lsp_ask.wait.?.id, .rows = "" } });
try std.testing.expectEqual(@as(usize, 1), npanes(p));
try std.testing.expect(std.mem.indexOf(u8, pane.msg[0..pane.msg_len], "none") != null);
// Several: the list open, the keyboard in it in normal mode on the
@@ -2508,7 +2508,7 @@ test "a language server's list: one answer lands with no pane, several open the
pane.body.cur_row = 0;
pane.body.cur_col = 0;
p.lspRequest(0, .references, "");
- p.update(.{ .lsp_resp = .{ .id = p.lsp_wait.?.id, .rows = "/test.txt:1:1-5 alpha one\n/test.txt:3:1-5 alpha two\n/test.txt:5:1-5 alpha three\n" } });
+ p.update(.{ .lsp_resp = .{ .id = p.lsp_ask.wait.?.id, .rows = "/test.txt:1:1-5 alpha one\n/test.txt:3:1-5 alpha two\n/test.txt:5:1-5 alpha three\n" } });
const qid = queryPane(p).?;
const qp = p.panes[qid].?;
const q = qp.query.?;