# acme 1-2/1-3 chords in a file pane: with the left button holding a drag # selection, tapping middle Cuts it into the snarf (yank) register; tapping # right Pastes the register (replacing the selection, or splicing at a bare # click point); cut then paste in ONE hold nets out to copy/Snarf. The left # release after a chord is inert (the cursor stays where the op left it). # Also the cancel chords: tapping right during a middle (execute) drag or # left during a right (look) drag cancels the gesture entirely. lines f.txt 5 lines g.txt 2 # The narrow-window fallback splits below the source shell and leaves the # unrelated right column untouched. Give the caller enough cells that the selected # `echo B''OO g.txt` remains one displayed row; this test is about chords, not # soft-wrap traversal. start 31 120 -n 3 wait 8000 f.txt stable 700 20000 # open f.txt: click a body spot, type the name, look it press left 5 9 release left 5 9 stable 400 5000 key i text f.txt key esc settle 100 stable 400 5000 press right 6 9 release right 6 9 wait 10000 line 3 stable 700 15000 snap opened # 1-2 Cut: left-drag over "line" on line 2, tap middle while holding press left 8 9 drag left 11 9 press middle 11 9 release middle 11 9 release left 11 9 stable 400 5000 snap cut # 1-2 then 1-3 in one hold = copy: line 3 keeps its text, register loaded press left 8 10 drag left 11 10 press middle 11 10 release middle 11 10 press right 11 10 release right 11 10 release left 11 10 stable 400 5000 snap copied # 1-3 at a bare click point: hold left past the end of line 4, tap right — # the register splices in at the click press left 14 11 press right 14 11 release right 14 11 release left 14 11 stable 400 5000 snap pointpaste # 1-3 over a fresh selection replaces it with the register press left 9 12 drag left 11 12 press right 11 12 release right 11 12 release left 11 12 stable 400 5000 snap replaced # arm the cancel tests: append `echo B''OO g.txt` to line 2 press left 10 9 release left 10 9 stable 400 5000 key i text echo B''OO g.txt key esc settle 100 stable 400 5000 # 2-3 cancel (acme textselect2): tap right during the middle execute-drag # over `echo B''OO` — the command never runs (no BOO anywhere) press middle 10 9 drag middle 19 9 press right 19 9 release right 19 9 release middle 19 9 stable 700 8000 snap cancelexec # the same drag released clean proves the word was live: BOO appears press middle 10 9 drag middle 19 9 release middle 19 9 wait 10000 BOO stable 700 10000 snap execafter # 3-1 cancel (acme textselect3): tap left during the right look-drag over # g.txt — no pane opens press right 21 9 drag right 25 9 press left 25 9 release left 25 9 release right 25 9 stable 700 8000 snap cancellook # the same look released clean opens g.txt press right 21 9 drag right 25 9 release right 25 9 wait 10000 line 2 stable 700 10000 snap lookafter # a fresh left click dismisses the chord's leftover selection instead of # dragging the anchored span to the click: copy `line` on g.txt line 1 # (styled snap shows the selection), then click the next row (it's gone) press left 8 14 drag left 11 14 press middle 11 14 release middle 11 14 press right 11 14 release right 11 14 release left 11 14 stable 400 5000 snapstyle chordsel press left 8 15 release left 8 15 stable 400 5000 snapstyle clickdismiss # tty paste chord: a mouse-listening app gets the click forwarded (SGR, # body-relative) then the register between bracketed-paste markers — # cat -v prints the received bytes visibly press left 35 22 release left 35 22 stable 400 5000 key c-b stable 600 8000 text stty -icanon -echo; printf '\x1b[?2004h\x1b[?1000h\x1b[?1006h'; cat -v key enter stable 700 8000 press left 40 24 press right 40 24 release right 40 24 release left 40 24 stable 700 8000 snap ttyprobe # a plain prompt (mouse modes off) gets no click bytes — just the paste; # readline's own 2004 strips the markers and inserts the register text key c-c stable 600 8000 text stty sane; printf '\x1b[?1000l\x1b[?1006l' key enter stable 600 8000 press left 40 24 press right 40 24 release right 40 24 release left 40 24 stable 700 8000 snap ttyprompt