From fc2bc8b80cf524c4a4800b8492b1ddcd6e693ab9 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 4 Nov 2026 23:55:03 -0300 Subject: image: the three renderer toggles (toggleGlyphArt, togglePalette, toggleAscii, a line each) are the field flips at their one caller each, the Petscii, Palette and Ascii builtins, and the image tag test sets the fields it wants Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/builtins.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/builtins.zig') diff --git a/src/builtins.zig b/src/builtins.zig index 3686eb88..95a6c692 100644 --- a/src/builtins.zig +++ b/src/builtins.zig @@ -1031,7 +1031,7 @@ pub const Petscii = struct { const want = stateArg(c, OnOff, "Petscii", "on or off") orelse return; if ((want == .on) == now) return; } - if (c.pane.image) |*state| panes.Image.toggleGlyphArt(state); + if (c.pane.image) |*state| state.glyph_art = !state.glyph_art; panes.terminal.togglePetscii(c.pane); } }; @@ -1046,7 +1046,7 @@ pub const Palette = struct { const want = stateArg(c, panes.Image.PaletteMode, "Palette", "commodore or terminal") orelse return; if (want == state.pmode) return; } - panes.Image.togglePalette(state); + state.pmode = if (state.pmode == .commodore) .terminal else .commodore; } }; @@ -1060,7 +1060,7 @@ pub const Ascii = struct { const want = stateArg(c, OnOff, "Ascii", "on or off") orelse return; if ((want == .on) == state.ascii) return; } - panes.Image.toggleAscii(state); + state.ascii = !state.ascii; } }; -- cgit v1.3