From 84b04c8ea7f04ba7569628e49ca900622c8d7858 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 16:53:47 -0300 Subject: 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 --- src/exec.zig | 1 + 1 file changed, 1 insertion(+) (limited to 'src/exec.zig') 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 {}; -- cgit v1.3