summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-07-06 14:07:49 -0300
committerGabriel Schneider <[email protected]>2026-08-01 15:02:07 -0300
commit839c84129057e501cd558bd419f2cd1825419bb6 (patch)
tree9665fd0928c960186d42de651dae01f77152e47e /test
parentde4def3548a6729b0dfd2120495a61beef8c8c2c (diff)
downloadpardes-839c84129057e501cd558bd419f2cd1825419bb6.tar.gz
pardes-839c84129057e501cd558bd419f2cd1825419bb6.zip
ghostty middle-click diagnosis: not a pardes bug — ghostty's GTK apprt swallows middle press+release before mouse reporting when the desktop sets gtk-enable-primary-paste=false (apprt/gtk/class/surface.zig gcMouseDown/gcMouseUp; this machine has it false in gsettings). New snapshot ghostty-mid feeds pardes ghostty's byte-exact SGR middle-click stream (focus-in, per-cell hover motions, press M/release m) and proves the tty path executes it correctly. Comment at the setMouseMode call documents the trap.
Diffstat (limited to 'test')
-rw-r--r--test/snapshots/ghostty-mid.golden31
-rw-r--r--test/snapshots/ghostty-mid.snap32
2 files changed, 63 insertions, 0 deletions
diff --git a/test/snapshots/ghostty-mid.golden b/test/snapshots/ghostty-mid.golden
new file mode 100644
index 00000000..597d2061
--- /dev/null
+++ b/test/snapshots/ghostty-mid.golden
@@ -0,0 +1,31 @@
+== snap ghostty-mid grid=100x30 cursor=4,7
+|Kill Newcol Tutor Debug Colors NextColor Dump
+| nm /tmp/pardes-snap/ghostty-mid/cwd Del nm /tmp/pardes-snap/ghostty-mid/cwd Del
+| ZZPAD
+| ./g.sh g.txt
+|
+| GHOSTOK
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| nm /tmp/pardes-snap/ghostty-mid/cwd Del
+|
+| g.txt
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
diff --git a/test/snapshots/ghostty-mid.snap b/test/snapshots/ghostty-mid.snap
new file mode 100644
index 00000000..437fce27
--- /dev/null
+++ b/test/snapshots/ghostty-mid.snap
@@ -0,0 +1,32 @@
+# ghostty's wire flavor of a middle click, byte-exact (mode 1002;1003;1004;1006
+# as pardes requests): focus-in, per-cell hover motions (ghostty dedups per
+# cell, so none repeat), press keeping SGR button identity, release 'm',
+# trailing hover — split across writes like real input. Proves the tty input
+# path (vaxis parse -> core execute) handles ghostty's encoding: the live bug
+# ("middle click dead only in ghostty") is ghostty's GTK apprt swallowing
+# middle press+release BEFORE mouse reporting whenever the desktop has
+# gtk-enable-primary-paste=false (apprt/gtk/class/surface.zig, gcMouseDown/
+# gcMouseUp) — the bytes below simply never get sent.
+file g.txt x
+start 30 100
+wait 8000 g.txt
+stable 700 20000
+press left 5 8
+release left 5 8
+stable 400 5000
+key c-b
+stable 600 8000
+text printf '#!/bin/sh\necho GHOST''OK\n' > g.sh; chmod +x g.sh; clear; printf 'ZZPAD\n./g.sh\n'
+key enter
+wait 10000 ./g.sh
+stable 700 10000
+key c-b
+stable 600 8000
+send \x1b[I
+send \x1b[<35;10;8M\x1b[<35;7;6M\x1b[<35;4;4M
+send \x1b[<1;4;4M
+send \x1b[<1;4;4m
+send \x1b[<35;6;4M
+wait 10000 GHOSTOK
+stable 700 10000
+snap ghostty-mid