summaryrefslogtreecommitdiff
path: root/core/root.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-24 23:20:24 -0300
committerGabriel Schneider <[email protected]>2026-11-24 23:37:04 -0300
commit5c938585963818743139439bfc5db6a15c90e10b (patch)
treee4f16fe8896bcba5678ea05b6805d88c0b11f640 /core/root.zig
parent5c941c2278a4e099f3cd4bae1b29a783f88a95b0 (diff)
downloadpardes-5c938585963818743139439bfc5db6a15c90e10b.tar.gz
pardes-5c938585963818743139439bfc5db6a15c90e10b.zip
Messages, body_layer, edit, mouse, panes: a click lands on what is drawn under it while a message's detail is unrolled under the caret's line, and the detail's rows are read-only text for the mouse (walk UI G item 2d, the user's "everything a pane shows is regular text"): C's detail rows (body_layer.zig messageGhosts) pushed the rows under the caret's line down in the drawing only, so the mouse, which maps a body row through the row map (Pane.wrapAt), landed a click below them that many rows off (C's report: 'to fix'), and a click on a detail row landed on a line under it; THE FIX: where the detail goes is the step's, as the notice bands are: Messages.detailUnder (the first message naming the caret's line, its lines that fit under that line's last row, in the pane with the keyboard, its body) is made in Messages.collectNotices (the top of update, presented, sync, place) into Pane.ghost_at and ghost_rows (derived: root.zig's kept_out says so), messageGhosts draws from them (it no longer finds the detail itself), and the mouse maps a drawn body row to the row map with Pane.textRow (edit.pointerTextSelection, both the grid's and a body hit's; mouse.dragUpdate's sweep end): a row under the detail is ghost_rows higher, a row of the detail is the line it explains (B1 there puts the caret on that line, the detail kept); B2 and B3 on a word of the detail Exec and Look it as a typed word would be (mouse.zig, body_layer.wordAt reads the word as it is drawn: the body layer's row, else the grid's); a step reads only what its own state makes, so every replica's click lands alike; cost: one more check a pane at collectNotices (none without a live message, the detail only in the pane with the keyboard), nothing a frame; TEST FIRST: body_layer.zig 'a click under a message's detail lands on the row drawn there, a click on the detail on the line it explains, and B2 on a word of the detail runs it' (on the parent: expected 4, found 6, the click on line 5 as drawn landing on line 7's row); NOT DONE: B1's sweep cannot select the detail's text itself (it is no buffer's; the band has the same gap, A's report), a hover underlines the word of the line under the detail row; tui core-test 1036/1205 (169 skipped), process-test 0 of 146 failed
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'core/root.zig')
-rw-r--r--core/root.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/root.zig b/core/root.zig
index 61c236ae..b41a1336 100644
--- a/core/root.zig
+++ b/core/root.zig
@@ -772,6 +772,8 @@ const kept_out = [_]struct { []const u8, []const u8, []const u8 }{
.{ "panes.zig", "pv pv_known", "the views' shares as this process parks them (views.zig)" },
.{ "panes.zig", "wrap_line wrap_col wrap_pad wrap_n body_wrapped context_rows body_rows body_visible_rows context_row_limit geometry_key geometry_len top_skip", "File.geometry's, made by whoever asks first (a frame or a step) from everything its key hashes of the step's state (the tab's width too); top_skip, keyed by the geometry it is of, read only through File.topSkip, which walks one of another key again" },
.{ "panes.zig views.zig", "notices", "made again from the step's state at the top of update and presented, and at sync (Messages.collectNotices); a frame's are its own" },
+ .{ "panes.zig", "ghost_at", "where a message's detail is drawn under the caret's line (Messages.detailUnder), made again from the step's state with the notices (Messages.collectNotices: at the top of update, presented, sync, place); a frame's are its own" },
+ .{ "panes.zig", "ghost_rows", "the detail's rows there, made again with ghost_at" },
.{ "panes.zig views.zig", "band_rows", "the band's rows under a tag (Band.takes), made again from the view's tag state at every sync before anything reads them (layout.floorRows reads the last sync's, as it reads tag_rows)" },
.{ "panes.zig views.zig", "pan", "written by steps only (sync, a view unparked) from the pane and its terminal" },
.{ "File.zig", "cap line_starts line_cap widest", "the text's line index, of its bytes, and the widest line it found (an upper bound: which walk answers, never what)" },