From 06a1f82f1cc37225b6acc46e63bd2eb36e034b1a Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 21 Jan 2025 21:00:56 +0800 Subject: feat(terminal): forward X1 and X2 mouse events Ref: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Other-buttons --- test/functional/terminal/buffer_spec.lua | 44 ++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 13 deletions(-) (limited to 'test/functional') diff --git a/test/functional/terminal/buffer_spec.lua b/test/functional/terminal/buffer_spec.lua index a524e49ef4..d36dc60a93 100644 --- a/test/functional/terminal/buffer_spec.lua +++ b/test/functional/terminal/buffer_spec.lua @@ -594,18 +594,36 @@ describe('terminal input', function() '', '', '', - '', - '', - '<2-LeftMouse>', - '<2-LeftRelease>', - '', - '', - '<2-RightMouse>', - '<2-RightRelease>', - '', - '', - '<2-MiddleMouse>', - '<2-MiddleRelease>', + '<0,0>', + '<0,1>', + '<0,1>', + '<2-LeftMouse><0,1>', + '<2-LeftDrag><0,0>', + '<2-LeftRelease><0,0>', + '<0,0>', + '<0,1>', + '<0,1>', + '<2-MiddleMouse><0,1>', + '<2-MiddleDrag><0,0>', + '<2-MiddleRelease><0,0>', + '<0,0>', + '<0,1>', + '<0,1>', + '<2-RightMouse><0,1>', + '<2-RightDrag><0,0>', + '<2-RightRelease><0,0>', + '<0,0>', + '<0,1>', + '<0,1>', + '<2-X1Mouse><0,1>', + '<2-X1Drag><0,0>', + '<2-X1Release><0,0>', + '<0,0>', + '<0,1>', + '<0,1>', + '<2-X2Mouse><0,1>', + '<2-X2Drag><0,0>', + '<2-X2Release><0,0>', '', '', '', @@ -622,7 +640,7 @@ describe('terminal input', function() {5:[No Name] 0,0-1 All}| %s^ {MATCH: *}| {3:-- TERMINAL --} | - ]]):format(key)) + ]]):format(key:gsub('<%d+,%d+>$', ''))) end end) -- cgit