summaryrefslogtreecommitdiff
path: root/src/pardes.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/pardes.zig')
-rw-r--r--src/pardes.zig19
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();