summaryrefslogtreecommitdiff
path: root/src/mouse.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 20:56:14 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:17 -0300
commit04b047fb366ea2c595708fb62467f690fce4b9ec (patch)
treeb2b765cbca96bcfd1785a39f60f0e0398a6aabb2 /src/mouse.zig
parent9554cc4c544632b01f740f895fd6db9f9952c02e (diff)
downloadpardes-04b047fb366ea2c595708fb62467f690fce4b9ec.tar.gz
pardes-04b047fb366ea2c595708fb62467f690fce4b9ec.zip
Terminal.zig is terminal.zig: a file of functions and no fields takes a namespace's lowercase name
The last of the deferred renames, now that the tty and theme agents have landed: panes.terminal at its importers, the alias lines in Text.zig and File.zig and panes.zig's own uses following. dump.zig's Terminal struct, a dump record, is not this. The served sources list and docs/design.typ name the new file. test/perf.zig's references change, so the three perf baselines take its new harness id with their numbers as recorded. No behaviour changes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/mouse.zig')
-rw-r--r--src/mouse.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mouse.zig b/src/mouse.zig
index 1f2648b0..cb0378de 100644
--- a/src/mouse.zig
+++ b/src/mouse.zig
@@ -821,7 +821,7 @@ fn mirrorTtySelection(p: *Pardes, pane: *Pane) void {
const forward = gesture.r1 > gesture.r0 or (gesture.r1 == gesture.r0 and gesture.c1 >= gesture.c0);
const endpoint = rows[if (forward) rows.len - 1 else 0];
const body = body_layer.bodyText(p, p.scratch.allocator(), pane) catch return;
- const line = modal.lineSlice(body, @intCast(@max(0, endpoint.row - panes.Terminal.gridOffset(pane))));
+ const line = modal.lineSlice(body, @intCast(@max(0, endpoint.row - panes.terminal.gridOffset(pane))));
const byte = if (forward) modal.prevGrapheme(line, @min(endpoint.hi, line.len)) else endpoint.lo;
pane.body.cur_row = pane.surfRow(endpoint.row);
var shown = std.mem.trimEnd(u8, line[@min(endpoint.prompt_bytes, line.len)..], " \t");
@@ -1137,11 +1137,11 @@ fn chordCutPaste(p: *Pardes, cut: bool) void {
if (cut) return;
const y = p.registers.text(p.gpa, pardes.Registers.default) orelse return;
if (y.len == 0) return;
- if (panes.Terminal.reportsMouse(pane)) {
+ if (panes.terminal.reportsMouse(pane)) {
const col: u16 = @intCast(std.math.clamp(pane.sel[sel_slot].c1 + 1, 1, 9999));
const row: u16 = @intCast(std.math.clamp(pane.sel[sel_slot].r1 - @as(i32, pane.tag_rows) + 1, 1, 9999));
var mb: [32]u8 = undefined;
- if (panes.Terminal.mouseFormatSgr(pane)) {
+ if (panes.terminal.mouseFormatSgr(pane)) {
p.emitWrite(s.id, std.fmt.bufPrint(&mb, "\x1b[<0;{d};{d}M\x1b[<0;{d};{d}m", .{ col, row, col, row }) catch return);
} else {
// ponytail: legacy X10 bytes; add utf8/urxvt formats if an app ever wants them