summaryrefslogtreecommitdiff
path: root/core/Core.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/Core.zig')
-rw-r--r--core/Core.zig7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/Core.zig b/core/Core.zig
index 11f254ab..6ee82370 100644
--- a/core/Core.zig
+++ b/core/Core.zig
@@ -396,6 +396,9 @@ lsp_ask: Ask = .{},
pipe: Pipe = .{},
/// A query pane's Grep, and its Find's listing, on a worker (Stream.zig).
stream: Stream = .{},
+/// The pickers: the one live in a view's tag, and the last ones rolled
+/// up, which their list words and Resume reopen (Pick.zig).
+picks: [pardes.Pick.max_lists]?*pardes.Pick = @splat(null),
/// The panes' `Changes` (jj.zig): what was asked of jj, and what it
/// answered for each pane, by its serial: the session's, not a field of
/// every pane (a digest and a rollback copy walk every pane's fields at
@@ -926,6 +929,7 @@ pub fn deinit(p: *Pardes) void {
look.cancelLookHover(p);
if (p.repl_ask) |ask| p.gpa.free(ask.text);
for (0..MAX_PANES) |id| p.dropPendingWrite(id);
+ pardes.Pick.deinitAll(p);
// The panes, then those retired these last two frames.
inline for (.{ &p.panes, &p.retired_panes.previous, &p.retired_panes.current }) |slots| for (slots) |*slot| if (slot.*) |pane| {
pardes.panes.teardownPane(p, pane);
@@ -1824,6 +1828,7 @@ fn updateInner(p: *Pardes, ev: Event) void {
for (p.panes) |slot| if (slot) |pane| pane.places.settle(p, pane, ev == .tick);
// Each live query pane's rows, made from what changed this step.
pardes.panes.Query.produceAll(p, ev == .tick, ev == .key);
+ pardes.Pick.produceAll(p, ev == .tick);
_ = p.scratch.reset(.{ .retain_with_limit = memory.limits.scratch_kept });
p.sync();
p.fsReport();
@@ -2162,7 +2167,7 @@ pub fn nextWake(p: *const Pardes) ?u64 {
for (p.panes) |slot| if (slot) |pane| if (pane.places.busy(pane)) return next;
const kinds = pardes.Kind.wake(p);
if (kinds) |due| if (due <= next) return next;
- if (pardes.panes.Query.busy(p)) return next;
+ if (pardes.panes.Query.busy(p) or pardes.Pick.busy(p)) return next;
// A typed Grep waiting out its pause.
const streaming = p.stream.wake(next);
if (streaming) |due| if (due <= next) return next;