diff options
Diffstat (limited to 'test/snapshots/wheeldrift.snap')
| -rw-r--r-- | test/snapshots/wheeldrift.snap | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/test/snapshots/wheeldrift.snap b/test/snapshots/wheeldrift.snap new file mode 100644 index 00000000..a546d2ff --- /dev/null +++ b/test/snapshots/wheeldrift.snap @@ -0,0 +1,45 @@ +# the touchpad drift guard (config.wheel_guard_ticks). A two-finger swipe that +# is MEANT to be vertical carries a little sideways drift and the pad turns it +# into wheel_left/wheel_right, so the view used to slide sideways under a plain +# scroll. Every vertical tick re-arms the guard; a horizontal tick spends one +# instead of scrolling. SGR codes are vaxis's: 64/65 = wheel up/down (the +# `wheel` command), 66/67 = wheel RIGHT/left, sent raw as hscroll.snap does. +# The drift ticks here are all rightward on purpose: leftward drift at column 0 +# is clamped away and would prove nothing. +lines drift.txt 20 _0123456789_abcdefghij_ZEND +start 16 70 drift.txt +wait 8000 drift.txt +stable 700 20000 +snap home +# a drifting swipe: five ticks down with three sideways ones mixed in. The +# view scrolls DOWN five lines and does not move one column sideways. +wheel down 10 5 +wheel down 10 5 +send \x1b[<66;10;5M +wheel down 10 5 +send \x1b[<66;10;5M +send \x1b[<66;10;5M +wheel down 10 5 +wheel down 10 5 +stable 400 5000 +snap drifted +# the guard is armed at 3 now, so a DELIBERATE horizontal swipe pays it off +# first: these three ticks still move nothing (without the guard they would +# have shifted the text 12 columns) +send \x1b[<66;10;5M +send \x1b[<66;10;5M +send \x1b[<66;10;5M +stable 400 5000 +snap paying +# ...and from the fourth tick on it scrolls freely: two ticks, 8 columns +send \x1b[<66;10;5M +send \x1b[<66;10;5M +stable 400 5000 +snap moved +# vertical again re-arms the guard, so drift is swallowed once more even +# though horizontal was just running +wheel up 10 5 +send \x1b[<66;10;5M +send \x1b[<66;10;5M +stable 400 5000 +snap rearmed |
