diff options
Diffstat (limited to 'core/Query.zig')
| -rw-r--r-- | core/Query.zig | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/core/Query.zig b/core/Query.zig index dacc11a1..0cecb93e 100644 --- a/core/Query.zig +++ b/core/Query.zig @@ -200,16 +200,16 @@ fn freeSaved(gpa: std.mem.Allocator, s: Saved) void { gpa.free(s.items); } -/// The owner's query pane (attached to it, or left where it was by -/// Unattach): the one a later search from it reuses. +/// The owner's query pane (docked to it, or left where it was by +/// Undock): the one a later search from it reuses. pub fn ofOwner(p: *Pardes, owner_serial: u32) ?usize { var found: ?usize = null; for (p.panes, 0..) |slot, i| { const pane = slot orelse continue; const q = pane.query orelse continue; if (q.owner != owner_serial) continue; - // the attached one first: an unattached one is a kept result - if (pane.attached_to == owner_serial) return i; + // the docked one first: an undocked one is a kept result + if (pane.docked_to == owner_serial) return i; found = found orelse i; } return found; @@ -1754,7 +1754,7 @@ fn promote(p: *Pardes, qid: usize, id: usize) void { // Its text was read from that file to preview it (displayPreview). f.on_disk = filesystem.localPath(f.path) != null; f.syntax_dirty = true; - pane.attached_to = null; + pane.docked_to = null; if (f.on_disk) p.recent.opened(p.recentGpa(), f.path); if (filesystem.localPath(f.path) != null) p.emit(.{ .watch = .{ .pane = .at(id), .on = true } }); pardes.ctlfs.events.noteLog(p, .rename, pane); @@ -1887,7 +1887,7 @@ pub fn cancel(p: *Pardes, id: usize) void { // A preview made for the query Esc took back has no use: its rows // go to the text whose rows they were. if (previewOf(p, id)) |pid| { - p.panes[pid].?.attached_to = null; + p.panes[pid].?.docked_to = null; p.removePane(pid, owner_id) catch |err| p.reportError(.at(id), "query", err); q.preview = 0; } @@ -2354,7 +2354,7 @@ test "Find: names fuzzy per keystroke, the group born with its +Preview, nothing try std.testing.expectEqual(pv, p.view().active); try std.testing.expectEqual(serial, p.panes[pv].?.serial); try std.testing.expect(p.panes[pv].?.file.?.output == null); - try std.testing.expect(p.panes[pv].?.attached_to == null); + try std.testing.expect(p.panes[pv].?.docked_to == null); layout.compute(p); try std.testing.expectEqualDeep(rect, p.view().rects[pv]); try std.testing.expect(q.frozen); @@ -2754,6 +2754,6 @@ test "a query row's address reaches every way a look arrives: an empty look writ // the whole row written to the pane's look: the place a.body.cur_row = 0; const tree = @import("ninep/tree.zig"); - try std.testing.expectEqual(tree.Status.ok, @import("ninep/testing.zig").wr(p, tree.Node.of(qp.serial, .look), line).reply.status); + try std.testing.expectEqual(tree.Status.ok, @import("ninep/harness.zig").wr(p, tree.Node.of(qp.serial, .look), line).reply.status); try std.testing.expectEqual(@as(i32, 3), a.body.cur_row); } |
