summaryrefslogtreecommitdiff
path: root/core/exec.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-22 20:21:32 -0300
committerGabriel Schneider <[email protected]>2026-11-22 20:21:32 -0300
commit3f250d0f963f375d699f11ffc02b07f2e2cbbbee (patch)
tree4e5a1f577fd3dd247f3643d979868347524ce703 /core/exec.zig
parent34e2d82a322bd3767a8ec62b3a4c0894399e8c04 (diff)
parentc607dc14502a6956bdfa3575bc7363514a7abeb4 (diff)
downloadpardes-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/exec.zig')
-rw-r--r--core/exec.zig5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/exec.zig b/core/exec.zig
index 99868434..d1e1830f 100644
--- a/core/exec.zig
+++ b/core/exec.zig
@@ -111,7 +111,7 @@ pub fn operandAt(p: *Pardes, pane: *Pane, clicked: Pane.Sel, borrow: bool, for_l
const visible = clicked.r0 - @as(i32, pane.tag_rows);
const wrapped = pane.wrapAt(p.settings.tab, visible);
const raw = pane.isTerminal() and pane.body.mode == .tty and clicked.r0 >= pane.tag_rows;
- const row = if (raw) @as(i32, @intCast(panes.Term.grid(pane.terminal).offset)) + visible else wrapped.line;
+ const row = if (raw) @as(i32, @intCast(pane.termTop())) + visible else wrapped.line;
const raw_line = if (raw) modal.lineSlice(body_layer.bodyText(p.settings.tab, p.scratch.allocator(), pane) catch "", @intCast(@max(0, visible))) else "";
const col = if (raw)
@as(i32, @intCast(panes.File.rawAtDisplay(p.settings.tab, raw_line, @intCast(@max(0, clicked.c0)))))
@@ -702,8 +702,7 @@ pub fn executeFrom(p: *Pardes, id: usize, txt: []const u8, from_body: bool) ?usi
// the buffer's LAST surface row: its lines may outnumber the shell
// rows it covers, and it is the bottom one output must clear
const max_row = o.row + @as(i32, @intCast(modal.lineCount(o.text))) - 1;
- const grid = panes.Term.grid(state);
- const cursor_abs = pane.surfRow(@as(i32, @intCast(grid.offset)) + @as(i32, grid.cursor_y));
+ const cursor_abs = pane.surfRow(@as(i32, @intCast(pane.termTop())) + @as(i32, panes.Term.grid(state).cursor_y));
const pad = std.math.clamp(max_row - cursor_abs, 0, @as(i32, pane.rows));
for (0..@intCast(pad)) |_| p.emitWrite(id, "\r");
};