From 63e62131aaedb91a8fa995b8e00ced808e053519 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 3 Nov 2026 17:01:04 -0300 Subject: test: five of test/panes.zig's mouse tests through the 9P tree alone (test/behaviour/mouse.zig, guide.typ's The mouse): a double-click's word, bracketed, quoted and line selections (read from sel) and in a tag (yanked and pasted into the body), a B1 chord's cut and paste one undo step (one Undo gives back the text before the cut), a click past a line's or the file's end and on a tab's or a wide glyph's second cell (dot, then the Z insert types), a B1 sweep over several lines a stream in a body and a tag (a B1-B2 cut of it); Session.where, the screen cell text is first drawn at; each checked to fail against a break (double-click selecting nothing, chord_hold no longer folding the chord's undo steps, the click clamp a column short of the line's end, every grapheme one cell wide to a click, a sweep's start at the lesser of its two columns) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- test/session.zig | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/session.zig') diff --git a/test/session.zig b/test/session.zig index 8b3c5c41..b55987eb 100644 --- a/test/session.zig +++ b/test/session.zig @@ -182,6 +182,12 @@ pub const Session = struct { fn pardesOf(s: *Session) *Pardes { return @ptrCast(@alignCast(s.core)); } + + // panes: + /// Where `text` is first drawn on the screen: its column and row. + pub fn where(s: *Session, text: []const u8) !struct { usize, usize } { + return s.find(text); + } }; fn refusal(path: []const u8, r: Reply) error{Refused} { -- cgit v1.3