summaryrefslogtreecommitdiff
path: root/src/Query.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Query.zig')
-rw-r--r--src/Query.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Query.zig b/src/Query.zig
index 5a66a0a3..caf64d54 100644
--- a/src/Query.zig
+++ b/src/Query.zig
@@ -789,7 +789,7 @@ fn recentRows(p: *Pardes, out: *std.Io.Writer.Allocating) []const u8 {
/// ponytail: no grouping for a big file until the disk engine's worker
/// parses it (phase 4).
fn ownerDecls(p: *Pardes, f: *File.State, small: bool) ?[]const syntax.ContextDeclaration {
- if (f.context_revision) |rev| if (rev == f.revision and f.context_declarations.len > 0) return f.context_declarations;
+ if (f.context.revision) |rev| if (rev == f.revision and f.context.declarations.len > 0) return f.context.declarations;
const cache = &p.locations_cache;
for (cache.entries[0..cache.len]) |entry| {
if (entry.declarations_ready and std.mem.eql(u8, entry.path, f.path) and std.mem.eql(u8, entry.source, f.content)) return entry.analysis.declarations;
@@ -2649,7 +2649,7 @@ test "a query row's place is its text: the match tinted after it, B3 on it opens
File.setContent(p, &sp.file.?, try p.gpa.dupe(u8, saved));
try std.testing.expect(sp.query == null and sp.file.?.location_rows.len == 0);
const at = std.mem.indexOf(u8, saved, "a.txt:2:5").?;
- const line = saved[at .. std.mem.indexOfScalarPos(u8, saved, at, '\n').?];
+ const line = saved[at..std.mem.indexOfScalarPos(u8, saved, at, '\n').?];
const word = look.expandedWord(line, 3).?;
a.body.cur_row = 0;
look.lookAt(p, sid, line[word.lo..word.hi]);