diff options
Diffstat (limited to 'core/draw.zig')
| -rw-r--r-- | core/draw.zig | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/core/draw.zig b/core/draw.zig index 1e53d1d0..16dfde5e 100644 --- a/core/draw.zig +++ b/core/draw.zig @@ -640,12 +640,21 @@ fn paintNoticeRow(p: *Pardes, s: *Surface) !void { const layer = &s.tag_layers[pardes.NOTICE_ROW_LAYER]; try renderHeaderLayer(p, layer, .notice_row, 0, viewport, row.text, 0, chrome.tagline_bg, chrome.tagline_fg); if (layer.rows == 0) return; - const dim: Color = .{ .rgb = colors.mix(chrome.tagline_fg, chrome.tagline_bg) }; + // The dim ink of the notice row's ground (colors.Roles: 3:1 at least). + const dim: Color = .{ .rgb = chrome.roles.notice.dim }; const ink: Color = .{ .rgb = chrome.tagline_fg }; const cells = layer.cells[0..layer.cols]; 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])); + // A picker's sentence: dim, its address in the text's ink. + if (row.quiet_left) { + const lo = panes.File.displayWidth(tab, row.text[0..@min(row.word[0], row.left)]); + const hi = panes.File.displayWidth(tab, row.text[0..@min(row.word[1], row.left)]); + for (cells[0..left], 0..) |*cell, x| if ((x < lo or x >= hi) and std.meta.eql(cell.style.fg, ink)) { + cell.style.fg = dim; + }; + } 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 }; |
