diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-05 22:40:49 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 23:58:31 -0300 |
| commit | dfcc040ac979b695dc2e68b9d866c2769ba6d928 (patch) | |
| tree | cd88c998b46f758a7c74e3d800312d968d6303ac /src/File.zig | |
| parent | f930d53c58187381b2f0df6892546ac1c217c9db (diff) | |
| download | pardes-dfcc040ac979b695dc2e68b9d866c2769ba6d928.tar.gz pardes-dfcc040ac979b695dc2e68b9d866c2769ba6d928.zip | |
settings #2, five presentation variants go, each now the style it had by default: Colors (text panes and terminals coloured, with SPC t c), TreeContextTagStyle (TreeContext rows in the tag's style), FocusTint (the focused tags tinted), SyntaxBold (keywords not bold) and Ligatures (the window shapes them; gui.zig's syncLigatures and the words' ligatures flag go, and Capabilities.ligatures); the reads deleted are in File.zig, body_layer.zig, Tables.zig, exec.zig's applySettingBuiltin, Core.zig (SessionView.layered left at its default), draw.zig, surface.zig's comment and gui.zig; deleted tests: "settings: Colors off draws a source plain, and on again colours its keywords", "Ligatures is a setting only in the shell that shapes text" and "Ligatures off draws a ligature as its cells' own glyphs, and on shapes it again", and the toggled half of TreeContext's Core test; rewritten through what stays: SyntaxBold's every-row test as keywords coloured in every row, the tag-click tests on JumpTrail, the tag-name tint tests with the focused tag's ink plain, Core's tab test by the keyword's ink; golden changes, each the cut's: syntax, theme, mini and ninep lose their Colors toggles and frames (the message row after them names the builtin before, Mini), and leader, ttyhelp and builtins' Help listing is four columns narrower, TreeContextTagStyle having been its longest word; perf.zig's harness id moves again; the window scenes from 09 on take new gui-goldens lines, the scene no longer writing FocusTint on and its word gone from the message row (the base window build running the same scenes gives the same frames); gates on tui: core-test 965/965, behaviour-test 242/242, unit-test 1482/1483, pane-test 171/172, snap all 105 scripts ok, process-test 0 of 37 failed; gui unit-test 1526/1527, gui-golden 0 of 1 failed
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
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; |
