diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-15 16:44:18 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-09-15 17:24:42 -0300 |
| commit | 96725011b43d7bf56ac02e710ea4ef4a76f05351 (patch) | |
| tree | 3fb1dd233337a6023fe11a8e1ad777d6f44accec /src/pardes.zig | |
| parent | 89b3c352378eb0284b521722a13c4245cab41b0c (diff) | |
| download | pardes-96725011b43d7bf56ac02e710ea4ef4a76f05351.tar.gz pardes-96725011b43d7bf56ac02e710ea4ef4a76f05351.zip | |
Make location highlighting an explicit output producer choice
Diffstat (limited to 'src/pardes.zig')
| -rw-r--r-- | src/pardes.zig | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/pardes.zig b/src/pardes.zig index 56f95040..25f4e18e 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -13827,17 +13827,14 @@ pub const Pardes = struct { } const tz_color = tracy.zone(@src(), "paneRecolor"); - switch (pane.colorAlgo()) { - .tty => if (p.settings.colors) panes.Terminal.recolorAnsi(p, pane, r, tx, tw, body_h, body), - // `.locations` joins them because it feeds the same `f.highlights` - // — only the pass that FILLED it differs (refreshHighlights). - .source, .diff, .locations => { - const f = &pane.file.?; - panes.File.drawGutter(p, pane, r, tx, tw, body_h, active); - if (p.settings.colors) panes.File.recolorSyntax(p, pane, f, r, tx, tw, body_h); - panes.File.drawWrapMarkers(p, pane, r, tx, tw, body_h, pane_bg); - }, - .none => {}, + // File layout is independent of whether its producer requests colors. + if (pane.file) |*f| { + panes.File.drawGutter(p, pane, r, tx, tw, body_h, active); + if (p.settings.colors and pane.colorAlgo() != .none) + panes.File.recolorSyntax(p, pane, f, r, tx, tw, body_h); + panes.File.drawWrapMarkers(p, pane, r, tx, tw, body_h, pane_bg); + } else if (pane.isTerminal() and p.settings.colors) { + panes.Terminal.recolorAnsi(p, pane, r, tx, tw, body_h, body); } tz_color.end(); |
