summaryrefslogtreecommitdiff
path: root/test/session.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-03 17:01:04 -0300
committerGabriel Schneider <[email protected]>2026-11-03 17:03:48 -0300
commit63e62131aaedb91a8fa995b8e00ced808e053519 (patch)
treecddcb8f17ea2139eb69893321beb0e78ac02e105 /test/session.zig
parentd1273bbd99daf9b1855d82bf315db8ede20abde5 (diff)
downloadpardes-63e62131aaedb91a8fa995b8e00ced808e053519.tar.gz
pardes-63e62131aaedb91a8fa995b8e00ced808e053519.zip
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 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'test/session.zig')
-rw-r--r--test/session.zig6
1 files changed, 6 insertions, 0 deletions
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} {