summaryrefslogtreecommitdiff
path: root/core/Query.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/Query.zig')
-rw-r--r--core/Query.zig14
1 files changed, 7 insertions, 7 deletions
diff --git a/core/Query.zig b/core/Query.zig
index b76a5aa4..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);