From 05118f216d524c96ffe936e494b8ecce26303de1 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 11:36:01 -0300 Subject: A builtin's Verbose announcement is the message row's alone, never logged With Verbose on by default, /log filled with msg - DumpDir, msg 4 Grep and the like, with machinery to take an announcement back out when its builtin failed or said something itself. A msg record is now only something said; the take-back machinery goes with it. Co-Authored-By: Claude Opus 5.5 --- src/exec.zig | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'src/exec.zig') diff --git a/src/exec.zig b/src/exec.zig index 1fc38b9c..9e46b434 100644 --- a/src/exec.zig +++ b/src/exec.zig @@ -861,23 +861,16 @@ pub fn runBuiltinFrom(p: *Pardes, b: Builtin, id: usize, txt: []const u8, arg: ? const pane = p.panes[id] orelse return; // A builtin says its own name before it runs, so a tagline click is // legible even when what it did is invisible. Whatever the builtin - // then says for itself replaces the announcement. - // Its log record stands only if it does not fail (events.dropFailedAnnouncement). - var announced: ?u64 = null; + // then says for itself replaces the announcement. It is the message + // row's only, never /log's: a msg record is something said. if (p.announce and p.settings.verbose and builtins.registry.announces(b)) { + p.fs.unlogged = true; p.setMessage(id, @tagName(b)); + p.fs.unlogged = false; pane.msg_announcement = true; - announced = pardes.ctlfs.events.newestSaying(p, @tagName(b)); - p.fs.announced_seq = announced; - const word = @tagName(b)[0..@min(@tagName(b).len, p.fs.announced_word.len)]; - @memcpy(p.fs.announced_word[0..word.len], word); - p.fs.announced_word_len = @intCast(word.len); } - const failures = p.fs.failures; const c: builtins.Ctx = .{ .p = p, .pane = pane, .id = id, .txt = txt, .arg = arg, .from_body = from_body }; builtins.registry.dispatch(b, c); - if (announced != null and p.fs.failures != failures and p.fs.announced_seq == announced) - pardes.ctlfs.events.dropFailedAnnouncement(p, "", true); } pub fn applySettingBuiltin(p: *Pardes, setting: config.Runtime.Setting, arg: ?[]const u8) void { -- cgit v1.3