comparison src/libvterm/t/17state_mouse.test @ 11621:b8299e742f41 v8.0.0693

patch 8.0.0693: no terminal emulator support commit https://github.com/vim/vim/commit/e4f25e4a8db2c8a8a71a4ba2a68540b3ab341e42 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jul 7 11:54:15 2017 +0200 patch 8.0.0693: no terminal emulator support Problem: No terminal emulator support. Cannot properly run commands in the GUI. Cannot run a job interactively with an ssh connection. Solution: Very early implementation of the :terminal command. Includes libvterm converted to ANSI C. Many parts still missing.
author Christian Brabandt <cb@256bit.org>
date Fri, 07 Jul 2017 12:00:04 +0200
parents
children f93337ae0612
comparison
equal deleted inserted replaced
11620:fb788b3997c1 11621:b8299e742f41
1 INIT
2 WANTSTATE p
3
4 !DECRQM on with mouse off
5 PUSH "\e[?1000\$p"
6 output "\e[?1000;2\$y"
7 PUSH "\e[?1002\$p"
8 output "\e[?1002;2\$y"
9 PUSH "\e[?1003\$p"
10 output "\e[?1003;2\$y"
11
12 !Mouse in simple button report mode
13 RESET
14 settermprop 1 true
15 settermprop 2 true
16 settermprop 7 1
17 PUSH "\e[?1000h"
18 settermprop 8 1
19
20 !Press 1
21 MOUSEMOVE 0,0 0
22 MOUSEBTN d 1 0
23 output "\e[M\x20\x21\x21"
24
25 !Release 1
26 MOUSEBTN u 1 0
27 output "\e[M\x23\x21\x21"
28
29 !Ctrl-Press 1
30 MOUSEBTN d 1 C
31 output "\e[M\x30\x21\x21"
32 MOUSEBTN u 1 C
33 output "\e[M\x33\x21\x21"
34
35 !Button 2
36 MOUSEBTN d 2 0
37 output "\e[M\x21\x21\x21"
38 MOUSEBTN u 2 0
39 output "\e[M\x23\x21\x21"
40
41 !Position
42 MOUSEMOVE 10,20 0
43 MOUSEBTN d 1 0
44 output "\e[M\x20\x35\x2b"
45
46 MOUSEBTN u 1 0
47 output "\e[M\x23\x35\x2b"
48 MOUSEMOVE 10,21 0
49 # no output
50
51 !Wheel events
52 MOUSEBTN d 4 0
53 output "\e[M\x60\x36\x2b"
54 MOUSEBTN d 4 0
55 output "\e[M\x60\x36\x2b"
56 MOUSEBTN d 5 0
57 output "\e[M\x61\x36\x2b"
58
59 !DECRQM on mouse button mode
60 PUSH "\e[?1000\$p"
61 output "\e[?1000;1\$y"
62 PUSH "\e[?1002\$p"
63 output "\e[?1002;2\$y"
64 PUSH "\e[?1003\$p"
65 output "\e[?1003;2\$y"
66
67 !Drag events
68 RESET
69 settermprop 1 true
70 settermprop 2 true
71 settermprop 7 1
72 PUSH "\e[?1002h"
73 settermprop 8 2
74
75 MOUSEMOVE 5,5 0
76 MOUSEBTN d 1 0
77 output "\e[M\x20\x26\x26"
78 MOUSEMOVE 5,6 0
79 output "\e[M\x40\x27\x26"
80 MOUSEMOVE 6,6 0
81 output "\e[M\x40\x27\x27"
82 MOUSEMOVE 6,6 0
83 # no output
84 MOUSEBTN u 1 0
85 output "\e[M\x23\x27\x27"
86 MOUSEMOVE 6,7
87 # no output
88
89 !DECRQM on mouse drag mode
90 PUSH "\e[?1000\$p"
91 output "\e[?1000;2\$y"
92 PUSH "\e[?1002\$p"
93 output "\e[?1002;1\$y"
94 PUSH "\e[?1003\$p"
95 output "\e[?1003;2\$y"
96
97 !Non-drag motion events
98 PUSH "\e[?1003h"
99 settermprop 8 3
100
101 MOUSEMOVE 6,8 0
102 output "\e[M\x43\x29\x27"
103
104 !DECRQM on mouse motion mode
105 PUSH "\e[?1000\$p"
106 output "\e[?1000;2\$y"
107 PUSH "\e[?1002\$p"
108 output "\e[?1002;2\$y"
109 PUSH "\e[?1003\$p"
110 output "\e[?1003;1\$y"
111
112 !Bounds checking
113 MOUSEMOVE 300,300 0
114 output "\e[M\x43\xff\xff"
115 MOUSEBTN d 1 0
116 output "\e[M\x20\xff\xff"
117 MOUSEBTN u 1 0
118 output "\e[M\x23\xff\xff"
119
120 !DECRQM on standard encoding mode
121 PUSH "\e[?1005\$p"
122 output "\e[?1005;2\$y"
123 PUSH "\e[?1006\$p"
124 output "\e[?1006;2\$y"
125 PUSH "\e[?1015\$p"
126 output "\e[?1015;2\$y"
127
128 !UTF-8 extended encoding mode
129 # 300 + 32 + 1 = 333 = U+014d = \xc5\x8d
130 PUSH "\e[?1005h"
131 MOUSEBTN d 1 0
132 output "\e[M\x20\xc5\x8d\xc5\x8d"
133 MOUSEBTN u 1 0
134 output "\e[M\x23\xc5\x8d\xc5\x8d"
135
136 !DECRQM on UTF-8 extended encoding mode
137 PUSH "\e[?1005\$p"
138 output "\e[?1005;1\$y"
139 PUSH "\e[?1006\$p"
140 output "\e[?1006;2\$y"
141 PUSH "\e[?1015\$p"
142 output "\e[?1015;2\$y"
143
144 !SGR extended encoding mode
145 PUSH "\e[?1006h"
146 MOUSEBTN d 1 0
147 output "\e[<0;301;301M"
148 MOUSEBTN u 1 0
149 output "\e[<0;301;301m"
150
151 !DECRQM on SGR extended encoding mode
152 PUSH "\e[?1005\$p"
153 output "\e[?1005;2\$y"
154 PUSH "\e[?1006\$p"
155 output "\e[?1006;1\$y"
156 PUSH "\e[?1015\$p"
157 output "\e[?1015;2\$y"
158
159 !rxvt extended encoding mode
160 PUSH "\e[?1015h"
161 MOUSEBTN d 1 0
162 output "\e[0;301;301M"
163 MOUSEBTN u 1 0
164 output "\e[3;301;301M"
165
166 !DECRQM on rxvt extended encoding mode
167 PUSH "\e[?1005\$p"
168 output "\e[?1005;2\$y"
169 PUSH "\e[?1006\$p"
170 output "\e[?1006;2\$y"
171 PUSH "\e[?1015\$p"
172 output "\e[?1015;1\$y"