diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-24 14:42:48 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-24 14:58:20 -0300 |
| commit | 249e0c92979012fc839ccd7b06643ee8ad5a735e (patch) | |
| tree | c487b3450079aad3d2687ec49f7309fc102e6cde /core/normal.zig | |
| parent | 8d0b21544824051873950ddcae1d4aab027a01fc (diff) | |
| download | pardes-249e0c92979012fc839ccd7b06643ee8ad5a735e.tar.gz pardes-249e0c92979012fc839ccd7b06643ee8ad5a735e.zip | |
rows: a view's top row is read off the geometry it is of, never another's (row scroll round 4, fault 1): `Pane.top_skip` (the top's row in its line and its first byte, a derived cache keyed by the geometry it is of) is read only through `File.topSkip`, the skip walk fillBody had, moved there: one keyed for another geometry is walked again, so the text pass, `topNow` (a step's top) and the map's pass all take the top of the view they draw or step: a step's `show` or `scrollRows` hands the NEXT geometry the byte it found (keyed so), and a view drawn or stepped in before that geometry is made (another view alike the first: a client's own view, drawn by `drawOne` after another client's unit moved the live one's top) took that byte for its own top line (the release soak's client panic, `index 41, len 38`); `geometry` stamps the top it found or took with the key it ends on (the walk brings tables and index up to it), so a text pass after a remade map reads it with no walk; `rowsOf` reads whether rows of the top line are above the top off the fresh map itself (its first body row starts past the line's first byte), not off the cache; the tab's width is in `geometryKey` (a Tab zeroed `geometry_key` and left `top_skip`, whose key then matched again: a row start of the old width trusted, a wrong row drawn and a step's top read wrong): the reset in exec.zig's Tab goes. The other readers of a pane's geometry, every one listed (the report's table): two read it on a step before making it: normal.zig `gotoWindow` read `context_rows` before `shownRows` made the geometry (gt/gb after a step that moved the top past its last geometry: the held rows of the place before; now read after it), and File.zig `rowTable` took its width from `body_wrapped` (the last geometry's) for j/k (`verticalMove`, which makes none): now from what that is made of, the view's `wrap`. The three tests of the change below pass (wip: gate to come)
Co-Authored-By: Claude Opus <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/normal.zig')
| -rw-r--r-- | core/normal.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/normal.zig b/core/normal.zig index 5a9794ee..1f7ce1a7 100644 --- a/core/normal.zig +++ b/core/normal.zig @@ -994,8 +994,8 @@ fn gotoWindow(tab: u16, t: *Text, text: []const u8, range: modal.Selection, whic // In rows, as helix's goto_window: the row `margin + n` in from the // body's top or its last row of text, inside the margins, the // cursor on the first byte it shows (a wrapped line's later row). - const held: i32 = w.context_rows; const shown: i32 = File.shownRows(tab, w); + const held: i32 = w.context_rows; const lines = File.textLineCount(t, text); var last: i32 = shown - 1; while (last > 0 and w.wrapAt(tab, held + last).line >= lines) last -= 1; |
