From 2537126c643db75419ff846f1041e40d154c9426 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 2 Oct 2026 01:01:43 -0300 Subject: Insert on a terminal's text says it edits a copy, run with Tab or B2, that the program's next drawing replaces, and that Ctrl-b types to the program Co-Authored-By: Claude Opus 5.5 --- src/terminal.zig | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/terminal.zig') diff --git a/src/terminal.zig b/src/terminal.zig index 140dae76..3bb1fbda 100644 --- a/src/terminal.zig +++ b/src/terminal.zig @@ -1637,6 +1637,11 @@ pub fn editText(p: *Pardes, pane: *Pane, lo: i32, hi: i32, col: i32) ?EditText { if (pane.ovl) |overlay| p.gpa.free(overlay.text); pane.ovl = .{ .row = row0, .rows = covered, .text = text }; } + // A terminal's text is its program's: edited here it is a copy, to run + // with Tab or B2, gone when the program draws again. Said at its first + // edit, so it never looks like an edit that was lost. + if (fresh) for (p.panes, 0..) |slot, id| if (slot == pane) + p.setMessage(id, "a copy of the terminal's text: Tab or B2 runs it; what the program draws next replaces it (Ctrl-b types to the program)"); return .{ .text = pane.ovl.?.text, .row0 = pane.ovl.?.row }; } -- cgit v1.3