diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 16:53:47 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:15 -0300 |
| commit | 84b04c8ea7f04ba7569628e49ca900622c8d7858 (patch) | |
| tree | 72fb125cd51f8a5f2302c5fb4f5916db93b0dee7 /src/exec.zig | |
| parent | 0e2afeecf6b8c0e9ac81da51f5f8c23a5be1a5ae (diff) | |
| download | pardes-84b04c8ea7f04ba7569628e49ca900622c8d7858.tar.gz pardes-84b04c8ea7f04ba7569628e49ca900622c8d7858.zip | |
A REPL question's answer goes to the pane its letter offered, or says that one is gone
The letter was looked up again when answered, so a REPL closed or rebound while the question stood could hand the text to another pane with the same letter, or drop it without a word. The question now keeps each letter's serial; the answer is that pane, still bound and running, or a message.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/exec.zig')
| -rw-r--r-- | src/exec.zig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/exec.zig b/src/exec.zig index 584d1b96..eb685c05 100644 --- a/src/exec.zig +++ b/src/exec.zig @@ -453,6 +453,7 @@ fn routeToRepl(p: *Pardes, from: usize, text: []const u8) Routed { const owned = p.gpa.dupe(u8, text) catch return .none; if (p.repl_ask) |old| p.gpa.free(old.text); p.repl_ask = .{ .from = src.serial, .lang = lang, .text = owned }; + for (bound[0..n]) |i| p.repl_ask.?.offered[p.panes[i].?.repl.?.letter - 'a'] = p.panes[i].?.serial; var w = std.Io.Writer.fixed(&src.question); w.print("send to {s}:", .{grammars[lang].name}) catch {}; for (bound[0..n]) |i| w.print(" {c}", .{p.panes[i].?.repl.?.letter}) catch {}; |
