summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-30 20:23:31 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:17 -0300
commit68dd567218505838814d73473460a0c0ff8e97b3 (patch)
treebabe029d3940c9dd6f7ef7b385086f2fabefe6aa /src/gui
parentf8fe738416fe3a40a7136f2cb5528e8fd57f40df (diff)
parentf99806de546c837ab6f2d5b1e3e8accc95e63a7e (diff)
downloadpardes-68dd567218505838814d73473460a0c0ff8e97b3.tar.gz
pardes-68dd567218505838814d73473460a0c0ff8e97b3.zip
Release Pardes 0.12
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui.zig12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gui/gui.zig b/src/gui/gui.zig
index 1e58d3ba..ea0e2862 100644
--- a/src/gui/gui.zig
+++ b/src/gui/gui.zig
@@ -5042,7 +5042,7 @@ test "a wheel's notch is whole lines, a touchpad's fraction is not" {
try std.testing.expectEqual(@as(?i32, null), notchOf(std.math.nan(f32), 1));
}
-test "a click over codex in a terminal reaches its pty with its modifiers; with Shift it is pardes's" {
+test "a click over codex in a terminal reaches its pty with its modifiers; Shift swaps B1 to pardes and B2 to the program" {
if (comptime !pardes.panes.terminal.enabled) return error.SkipZigTest;
const gpa = std.testing.allocator;
const core = try pardes.Pardes.init(gpa, .{ .cols = 60, .rows = 16, .tty_only = true });
@@ -5077,9 +5077,17 @@ test "a click over codex in a terminal reaches its pty with its modifiers; with
try std.testing.expectEqualStrings("\x1b[<32;7;4M", try take(core, &sent));
in.post(.{ .mouse = pointerMouse(.left, .release, next, .{}) });
try std.testing.expectEqualStrings("\x1b[<0;7;4m", try take(core, &sent));
+ // Shift-B1 is pardes's select; B2 is pardes's execute and Shift-B2
+ // the program's, reported without the Shift.
+ in.post(.{ .mouse = pointerMouse(.left, .press, mc, .{ .shift = true }) });
+ in.post(.{ .mouse = pointerMouse(.left, .release, mc, .{ .shift = true }) });
+ try std.testing.expectEqualStrings("", try take(core, &sent));
+ in.post(.{ .mouse = pointerMouse(.middle, .press, mc, .{}) });
+ in.post(.{ .mouse = pointerMouse(.middle, .release, mc, .{}) });
+ try std.testing.expectEqualStrings("", try take(core, &sent));
in.post(.{ .mouse = pointerMouse(.middle, .press, mc, .{ .shift = true }) });
in.post(.{ .mouse = pointerMouse(.middle, .release, mc, .{ .shift = true }) });
- try std.testing.expectEqualStrings("", try take(core, &sent));
+ try std.testing.expectEqualStrings("\x1b[<1;6;4M\x1b[<1;6;4m", try take(core, &sent));
}
test "a wheel over codex in a terminal reaches its pty as the mouse reports it asked for" {