From 50add182c04d0e95094b4012ce908154b30734d0 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Sun, 19 Jul 2026 10:13:39 +0000 Subject: [PATCH 14/71] debug(macos): print cursor position in the probe (rev 8) Atlas analysis: the 'c' glyph is correct in the atlas and my sampling reads it, but an anomalous last renderTile (x=2 y=2, 7x14, sampling the solid direct-mapped block at atlas x~7) paints a full-cell solid block over cell 0, blanking the 'c'. The direct-mapped solid block is the cursor's Block shape. Print the cursor position to confirm whether it sits on cell (0,0) (making the overlay the block cursor, drawn opaque over the glyph) vs elsewhere. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01AeG2jwYMX5gdvvtUnx3PJa --- src/contour_macos/render_probe.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/contour_macos/render_probe.cpp b/src/contour_macos/render_probe.cpp index 51cc13ad..6c234642 100644 --- a/src/contour_macos/render_probe.cpp +++ b/src/contour_macos/render_probe.cpp @@ -59,7 +59,7 @@ void writePpm(std::string const& path, contour_macos::PixelBuffer const& buf) // produced it. __DATE__/__TIME__ update whenever THIS translation unit is recompiled, so the // printed line is a reliable "is the running binary built from the current source?" signal // without needing a full rebuild. -#define RENDER_PROBE_REVISION 7 +#define RENDER_PROBE_REVISION 8 int main(int argc, char** argv) { @@ -167,6 +167,12 @@ int main(int argc, char** argv) std::fflush(stdout); } + { + auto const cursorPos = terminal.currentScreen().cursor().position; + std::printf("cursor at line=%d column=%d\n", (int) unbox(cursorPos.line), (int) unbox(cursorPos.column)); + std::fflush(stdout); + } + // Diagnostic: dump the texture atlas so we can see what got uploaded and where, and // whether the normalized sub-rects the tiles sample actually contain glyph pixels. if (auto shot = target.readAtlas(); shot.has_value())