# 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 17 70 drift.txt wait 8000 drift.txt stable 700 20000 # the guard protects HSCROLL, and hscroll only exists with soft wrap off (a # wrapped body has nothing off to the right to drift towards), so turn it off # first — otherwise every sideways tick is a no-op and the test proves nothing key space t w stable 400 5000 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;6M wheel down 10 5 send \x1b[<66;10;6M send \x1b[<66;10;6M 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;6M send \x1b[<66;10;6M send \x1b[<66;10;6M stable 400 5000 snap paying # ...and from the fourth tick on it scrolls freely: two ticks, 8 columns send \x1b[<66;10;6M send \x1b[<66;10;6M 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;6M send \x1b[<66;10;6M stable 400 5000 snap rearmed