diff options
Diffstat (limited to 'core/Messages.zig')
| -rw-r--r-- | core/Messages.zig | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/core/Messages.zig b/core/Messages.zig index 41344d1f..6231e3d1 100644 --- a/core/Messages.zig +++ b/core/Messages.zig @@ -679,6 +679,10 @@ pub const Row = struct { text: []const u8 = "", /// The message the left says, when it says one. lead: ?*const Said = null, + /// The left in the dim ink (a picker's sentence, UX D7), but for the + /// bytes `word` (an address, in the text's). + quiet_left: bool = false, + word: [2]usize = .{ 0, 0 }, }; /// Room for the notice row's line: the widest window's at the tagline's @@ -704,8 +708,10 @@ pub fn noticeRow(p: *const Pardes, width: usize, out: *[notice_row_cap]u8) Row { live += 1; if (s.kind == .question) questions += 1; } - const lead = m.headline(); - if (lead) |s| { + // While a picker previews, its sentence (UX D7), before any message. + const said = pardes.Pick.sentence(p, &w); + const lead = if (said == null) m.headline() else null; + if (said != null) {} else if (lead) |s| { w.print("{s} ", .{s.kind.glyph()}) catch {}; // Its cause first, unless its words name it already. const words = s.words(); @@ -743,7 +749,7 @@ pub fn noticeRow(p: *const Pardes, width: usize, out: *[notice_row_cap]u8) Row { for (0..gap) |_| w.writeByte(' ') catch {}; const right_at = w.end; w.writeAll(tail) catch {}; - return .{ .left = cut, .right = right_at, .text = w.buffered(), .lead = lead }; + return .{ .left = cut, .right = right_at, .text = w.buffered(), .lead = lead, .quiet_left = said != null, .word = said orelse .{ 0, 0 } }; } /// What notice band `i` says. The grid pass and the band layers both |
