diff options
Diffstat (limited to 'src/File.zig')
| -rw-r--r-- | src/File.zig | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/File.zig b/src/File.zig index 5b3c6bb7..038f4920 100644 --- a/src/File.zig +++ b/src/File.zig @@ -1580,13 +1580,6 @@ pub fn refreshHighlights(p: *Pardes) void { continue; } if (!f.syntax_dirty) continue; - if (!p.settings.colors) { - if (f.highlights.len > 0) p.tree_sitter_gpa.free(f.highlights); - f.highlights = &.{}; - f.highlight_start = 0; - f.syntax_dirty = false; - continue; - } // ponytail: a stretch over `long_paint` bytes (a minified line) is // painted only around the caret, so a key typed in a 500 KB line // parses 16 KB, not the line (190 ms a key in ReleaseSafe; 25 ms at @@ -1941,7 +1934,7 @@ pub fn drawGutter(p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect, tx: u16, const cell = s.at(tx + @as(u16, @intCast(col)), body_y + @as(u16, @intCast(context_row))); cell.default = false; cell.style.bg = .{ .rgb = context_bg }; - if (p.settings.tree_context_tag_style) cell.style.font_role = .tagline; + cell.style.font_role = .tagline; } } var vr: u16 = 0; @@ -2021,7 +2014,7 @@ pub const DiffTints = struct { fn synStyle(p: *Pardes, sy: syntax.Syn) ?SynStyle { return switch (sy) { .none => null, - .keyword => .{ .fg = p.theme().kw, .bold = p.settings.syntax_bold }, + .keyword => .{ .fg = p.theme().kw, .bold = false }, .string => .{ .fg = p.theme().str, .bold = false }, .number => .{ .fg = p.theme().num, .bold = false }, .comment => .{ .fg = p.theme().comment, .bold = false }, @@ -2255,7 +2248,7 @@ pub const DiffOutput = struct { /// The rows are the terminal's own, so a line it wrapped goes on in the /// row below (syntax.highlightDiffRows). pub fn recolorDiffOutput(p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect, tx: u16, tw: u16, body_h: u16, body: []const u8) void { - if (pane.command == null or !p.settings.colors) return; + if (pane.command == null) return; const tz = tracy.zone(@src(), "diffRecolor"); defer tz.end(); const rows = p.diff_output.lines(p, pane) orelse return; |
