summaryrefslogtreecommitdiff
path: root/test/panes.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-30 14:12:51 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:17 -0300
commitb546b578baadbd8fdd15b42988ad4d66c9c8ff21 (patch)
treebbbcaa94d63b0b695f09f2d389ca287377880d9a /test/panes.zig
parent3f6733c805d873a7af6a6064ace0cf5916f481da (diff)
downloadpardes-b546b578baadbd8fdd15b42988ad4d66c9c8ff21.tar.gz
pardes-b546b578baadbd8fdd15b42988ad4d66c9c8ff21.zip
A program that tracks the mouse gets its clicks, drags and moves over its grid, in the format it chose; Shift keeps pardes's select, execute and look, and chrome is never the program's
Presses and releases under 1000, drags with a button down under 1002, every move once per cell under 1003, X10 presses under 9, in raw terminal input only. A press the program took keeps its drag and release, reported clamped to the grid's edge wherever the pointer goes. The press also makes the pane the active one. docs/tags.md says so. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test/panes.zig')
-rw-r--r--test/panes.zig10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/panes.zig b/test/panes.zig
index d7fa3514..6f321abf 100644
--- a/test/panes.zig
+++ b/test/panes.zig
@@ -981,10 +981,12 @@ const TtySelectionTests = struct {
const target = p.rects[1];
const tx = target.x + config.GUTTER + 2;
const ty = bodyY(p, target);
- p.update(.{ .mouse = .{ .button = .left, .kind = .press, .col = tx, .row = ty } });
- p.update(.{ .mouse = .{ .button = .right, .kind = .press, .col = tx, .row = ty } });
- p.update(.{ .mouse = .{ .button = .right, .kind = .release, .col = tx, .row = ty } });
- p.update(.{ .mouse = .{ .button = .left, .kind = .release, .col = tx, .row = ty } });
+ // Shift: over a program that tracks the mouse the chord is
+ // pardes's only so, and elsewhere Shift changes nothing.
+ p.update(.{ .mouse = .{ .button = .left, .kind = .press, .col = tx, .row = ty, .shift = true } });
+ p.update(.{ .mouse = .{ .button = .right, .kind = .press, .col = tx, .row = ty, .shift = true } });
+ p.update(.{ .mouse = .{ .button = .right, .kind = .release, .col = tx, .row = ty, .shift = true } });
+ p.update(.{ .mouse = .{ .button = .left, .kind = .release, .col = tx, .row = ty, .shift = true } });
var written: std.Io.Writer.Allocating = .init(p.gpa);
defer written.deinit();
while (p.nextEffect()) |effect| {