diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-22 20:21:32 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-22 20:21:32 -0300 |
| commit | 3f250d0f963f375d699f11ffc02b07f2e2cbbbee (patch) | |
| tree | 4e5a1f577fd3dd247f3643d979868347524ce703 /core/draw.zig | |
| parent | 34e2d82a322bd3767a8ec62b3a4c0894399e8c04 (diff) | |
| parent | c607dc14502a6956bdfa3575bc7363514a7abeb4 (diff) | |
| download | pardes-3f250d0f963f375d699f11ffc02b07f2e2cbbbee.tar.gz pardes-3f250d0f963f375d699f11ffc02b07f2e2cbbbee.zip | |
integration (a base for the terminals' next round, not yet the gathered line): the viewport in the view and the patches in the semantics hash on merge58 with the terminal put back: pardes-raw-tty (`muwnrqro`, on pardes-merge58: a TERM that reaches a session while it leaves its terminal no longer leaves it raw: `Killed.disarm` puts the cooked modes back itself, `leave` calls it last) and pardes-term-join-10's two changes (`xktusoyq` on `qtxssxyk`, on pardes-term-join-9: where a view stands in a terminal's history is the view's (`Pane.scrolled_to`), carried once a confirmed write that moves rows, the wire at 31; build/patches hashed into a replica's semantics); no conflict; core-test 917/1077 (160 skipped), shell-test 1119/1122, pane-test 182/183, term-test 16/16; NOT gated whole: the viewport's gate had one perf count over its budget ("terminal on all" +0.235%), which the next round brings down before this is the gathered line (2026-11-22)
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/draw.zig')
| -rw-r--r-- | core/draw.zig | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/core/draw.zig b/core/draw.zig index 419b3a84..8198e2ff 100644 --- a/core/draw.zig +++ b/core/draw.zig @@ -106,7 +106,7 @@ pub fn place(p: *Pardes, s: *Surface) void { // A folded pane is its tag rows and nothing else. if (pane.collapsed) continue; const body_h = r.h -| pane.tag_rows; - const line: i32 = if (pane.file) |f| @intCast(@min(f.scroll, std.math.maxInt(i32))) else if (pane.isTerminal()) @intCast(panes.Term.grid(pane.terminal).offset) else 0; + const line: i32 = if (pane.file) |f| @intCast(@min(f.scroll, std.math.maxInt(i32))) else if (pane.isTerminal()) @intCast(pane.termTop()) else 0; // The text it shows, for a frontend's glide to tell apart: a file's // path, a generated text's revision with it (rows rewritten as its // view moved are another text's); none for a terminal or a picture. @@ -122,7 +122,7 @@ pub fn place(p: *Pardes, s: *Surface) void { .len = pane.rows, } else blk: { const grid = panes.Term.grid(pane.terminal); - break :blk .{ .total = grid.total, .offset = grid.offset, .len = grid.len }; + break :blk .{ .total = grid.total, .offset = pane.termTop(), .len = grid.len }; }; const track_h: usize = body_h; const total = if (sb.total == 0) 1 else sb.total; @@ -372,9 +372,8 @@ pub fn render(p: *Pardes, arena: std.mem.Allocator) !*Surface { sb_off = 0; sb_total = 0; } else { - const grid = panes.Term.grid(at.terminal); - sb_off = grid.offset; - sb_total = grid.total; + sb_off = at.termTop(); + sb_total = panes.Term.grid(at.terminal).total; } const effective_font = p.settings.font.effective_name.get(); const font_name = if (effective_font.len == 0) "default" else effective_font; |
