summaryrefslogtreecommitdiff
path: root/core/draw.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/draw.zig')
-rw-r--r--core/draw.zig7
1 files changed, 3 insertions, 4 deletions
diff --git a/core/draw.zig b/core/draw.zig
index f7b2cd3f..125cf54f 100644
--- a/core/draw.zig
+++ b/core/draw.zig
@@ -95,7 +95,7 @@ pub fn place(p: *Pardes, s: *Surface) void {
for (&p.panes, 0..) |*slot, id| {
const pane = slot.* orelse continue;
paneFacts(p, &p.facts, id, pane);
- Messages.collectNotices(p, pane, v.rects[id], id);
+ Messages.collectNotices(p, pane, v.rects[id]);
const r = v.rects[id];
if (r.w <= config.GUTTER or r.h == 0) continue;
const owner: u8 = @intCast(id);
@@ -230,8 +230,7 @@ fn joinNotice(p: *Pardes, s: *Surface, arena: std.mem.Allocator, region: Region)
const kind = pane.notices.kinds[i];
const r = v.rects[id];
const chip = region.rect.w;
- var leader_buf: [Messages.leader_room]u8 = undefined;
- const text = Messages.noticeText(p, pane, i, &leader_buf);
+ const text = Messages.noticeText(pane, i);
const bg = chrome.tag_bg;
const fg = chrome.tag_fg;
// Nothing to say, or too narrow for a layer: a blank chip on the grid.
@@ -640,7 +639,7 @@ fn paintNoticeRow(p: *Pardes, s: *Surface) !void {
const tab = p.settings.tab;
const left = @min(cells.len, panes.File.displayWidth(tab, row.text[0..row.left]));
const right = @min(cells.len, panes.File.displayWidth(tab, row.text[0..row.right]));
- if (p.messages.headline()) |lead| {
+ if (row.lead) |lead| {
if (lead.kind == .@"error" or lead.kind == .warn) if (cells.len > 0 and std.meta.eql(cells[0].style.fg, ink)) {
cells[0].style.fg = .{ .rgb = if (lead.kind == .@"error") chrome.diagnostic_error else chrome.diagnostic_warning };
};