From ffbf8a08586fce0909f44a73f3745d7c2ae0f0af Mon Sep 17 00:00:00 2001 From: sail3r <82087684+sail3r@users.noreply.github.com> Date: Sun, 15 Nov 2026 18:24:55 +1300 Subject: [PATCH 1/2] input: keep a backslash off the end of a // comment A // comment whose last character is '\' is joined to the next line by line splicing (translation phase 2), before comments are recognised, and GCC reports -Wcomment. The joined line here was itself a comment, so no code was lost, but the warning showed up in every host build that compiles maya with its default flags, and any later edit that turned the next line into code would have silently commented it out. Rewrap the sentence so "ESC \" sits mid-line. Wording is unchanged. --- src/terminal/input.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/terminal/input.cpp b/src/terminal/input.cpp index 55f2c91..2537a86 100644 --- a/src/terminal/input.cpp +++ b/src/terminal/input.cpp @@ -232,8 +232,8 @@ auto InputParser::feed(std::string_view bytes) -> std::vector { const std::size_t before = events.size(); const int acks_before = acks_; // tmux with extended-keys on re-encodes what a terminal - // sends: ESC ] arrives as CSI 27;3;93 ~ (Alt+]) and ESC \ - // as CSI 27;3;92 ~ (Alt+\). Followed by a clipboard reply + // sends: ESC ] arrives as CSI 27;3;93 ~ (Alt+]) and + // ESC \ as CSI 27;3;92 ~ (Alt+\). Followed by a clipboard reply // ("5522;" / "52;"), it is that reply's OSC opener, not a // key: read it as one, or the reply is typed in as text. if (buf_ == "\x1b[27;3;93~") { From d8c68206ed4d7506b37ea0de484a62058f0a401a Mon Sep 17 00:00:00 2001 From: sail3r <82087684+sail3r@users.noreply.github.com> Date: Sun, 15 Nov 2026 19:22:08 +1300 Subject: [PATCH 2/2] test(style): close the frame in the double-buffer theme test "theme: a swap survives the fullscreen double-buffer too" ran the pipeline up to write_diff() and dropped the result. write_diff() is [[nodiscard]] because the Opened stage it returns is the frame that is still open, so GCC warned -Wunused-result at both call sites (lines 687 and 703), the only warnings in maya's own build. Finish each chain with close_frame(false), the same call render_fullscreen.cpp makes. sync_output=false matches open_frame(false), so the only bytes added are the SGR reset "\x1b[0m". It contains neither background SGR the test looks for, so all three asserts check what they checked before: the first frame has the old background, the second has the new one and not the old. -fsyntax-only with maya's own compile_commands flags: no warnings. --- tests/test_style.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_style.cpp b/tests/test_style.cpp index 76ff6ff..bfeb126 100644 --- a/tests/test_style.cpp +++ b/tests/test_style.cpp @@ -684,7 +684,7 @@ TEST_CASE("theme: a swap survives the fullscreen double-buffer too") { std::string out1; RenderPipeline::start(back, pool, slot, out1) .clear().paint(Element{tree()}.build()) - .open_frame(false).write_diff(front); + .open_frame(false).write_diff(front).close_frame(false); assert(out1.find("48;2;17;34;51") != std::string::npos); std::swap(front, back); // present @@ -700,7 +700,7 @@ TEST_CASE("theme: a swap survives the fullscreen double-buffer too") { std::string out2; RenderPipeline::start(back, pool, slot, out2) .clear().paint(Element{tree()}.build()) - .open_frame(false).write_diff(front); + .open_frame(false).write_diff(front).close_frame(false); assert(out2.find("48;2;250;251;252") != std::string::npos); assert(out2.find("48;2;17;34;51") == std::string::npos);