comparison src/libvterm/t/62screen_damage.test @ 20452:bf530e4e910a v8.2.0780

patch 8.2.0780: libvterm code lags behind the upstream version Commit: https://github.com/vim/vim/commit/2d2970ea599e83acabee56be548a54a8e6b21007 Author: Bram Moolenaar <Bram@vim.org> Date: Sun May 17 16:29:47 2020 +0200 patch 8.2.0780: libvterm code lags behind the upstream version Problem: Libvterm code lags behind the upstream version. Solution: Include revisions 724 - 726.
author Bram Moolenaar <Bram@vim.org>
date Sun, 17 May 2020 16:30:04 +0200
parents src/libvterm/t/42screen_damage.test@b8299e742f41
children dc88c690f19b
comparison
equal deleted inserted replaced
20451:1b223803fdb6 20452:bf530e4e910a
1 INIT
2 WANTSCREEN Db
3
4 !Putglyph
5 RESET
6 damage 0..25,0..80
7 PUSH "123"
8 damage 0..1,0..1 = 0<31>
9 damage 0..1,1..2 = 0<32>
10 damage 0..1,2..3 = 0<33>
11
12 !Erase
13 PUSH "\e[H"
14 PUSH "\e[3X"
15 damage 0..1,0..3
16
17 !Scroll damages entire line in two chunks
18 PUSH "\e[H\e[5@"
19 damage 0..1,5..80
20 damage 0..1,0..5
21
22 !Scroll down damages entire screen in two chunks
23 PUSH "\e[T"
24 damage 1..25,0..80
25 damage 0..1,0..80
26
27 !Altscreen damages entire area
28 PUSH "\e[?1049h"
29 damage 0..25,0..80
30 PUSH "\e[?1049l"
31 damage 0..25,0..80
32
33 WANTSCREEN m
34
35 !Scroll invokes moverect but not damage
36 PUSH "\e[5@"
37 moverect 0..1,0..75 -> 0..1,5..80
38 damage 0..1,0..5
39
40 WANTSCREEN -m
41
42 !Merge to cells
43 RESET
44 damage 0..25,0..80
45 DAMAGEMERGE CELL
46
47 PUSH "A"
48 damage 0..1,0..1 = 0<41>
49 PUSH "B"
50 damage 0..1,1..2 = 0<42>
51 PUSH "C"
52 damage 0..1,2..3 = 0<43>
53
54 !Merge entire rows
55 RESET
56 damage 0..25,0..80
57 DAMAGEMERGE ROW
58
59 PUSH "ABCDE\r\nEFGH"
60 damage 0..1,0..5 = 0<41 42 43 44 45>
61 DAMAGEFLUSH
62 damage 1..2,0..4 = 1<45 46 47 48>
63 PUSH "\e[3;6r\e[6H\eD"
64 damage 2..5,0..80
65 DAMAGEFLUSH
66 damage 5..6,0..80
67
68 !Merge entire screen
69 RESET
70 damage 0..25,0..80
71 DAMAGEMERGE SCREEN
72
73 PUSH "ABCDE\r\nEFGH"
74 DAMAGEFLUSH
75 damage 0..2,0..5 = 0<41 42 43 44 45> 1<45 46 47 48>
76 PUSH "\e[3;6r\e[6H\eD"
77 DAMAGEFLUSH
78 damage 2..6,0..80
79
80 !Merge entire screen with moverect
81 WANTSCREEN m
82
83 RESET
84 damage 0..25,0..80
85 DAMAGEMERGE SCREEN
86
87 PUSH "ABCDE\r\nEFGH"
88 PUSH "\e[3;6r\e[6H\eD"
89 damage 0..2,0..5 = 0<41 42 43 44 45> 1<45 46 47 48>
90 moverect 3..6,0..80 -> 2..5,0..80
91 DAMAGEFLUSH
92 damage 5..6,0..80
93
94 !Merge scroll
95 RESET
96 damage 0..25,0..80
97 DAMAGEMERGE SCROLL
98
99 PUSH "\e[H1\r\n2\r\n3"
100 PUSH "\e[25H\n\n\n"
101 sb_pushline 80 = 31
102 sb_pushline 80 = 32
103 sb_pushline 80 = 33
104 DAMAGEFLUSH
105 moverect 3..25,0..80 -> 0..22,0..80
106 damage 0..25,0..80
107
108 !Merge scroll with damage
109 PUSH "\e[25H"
110 PUSH "ABCDE\r\nEFGH\r\n"
111 sb_pushline 80 =
112 sb_pushline 80 =
113 DAMAGEFLUSH
114 moverect 2..25,0..80 -> 0..23,0..80
115 damage 22..25,0..80 = 22<41 42 43 44 45> 23<45 46 47 48>
116
117 !Merge scroll with damage past region
118 PUSH "\e[3;6r\e[6H1\r\n2\r\n3\r\n4\r\n5"
119 DAMAGEFLUSH
120 damage 2..6,0..80 = 2<32> 3<33> 4<34> 5<35>
121
122 !Damage entirely outside scroll region
123 PUSH "\e[HABC\e[3;6r\e[6H\r\n6"
124 damage 0..1,0..3 = 0<41 42 43>
125 DAMAGEFLUSH
126 moverect 3..6,0..80 -> 2..5,0..80
127 damage 5..6,0..80 = 5<36>
128
129 !Damage overlapping scroll region
130 PUSH "\e[H\e[2J"
131 DAMAGEFLUSH
132 damage 0..25,0..80
133
134 PUSH "\e[HABCD\r\nEFGH\r\nIJKL\e[2;5r\e[5H\r\nMNOP"
135 DAMAGEFLUSH
136 moverect 2..5,0..80 -> 1..4,0..80
137 damage 0..5,0..80 = 0<41 42 43 44> 1<49 4A 4B 4C>
138 ## TODO: is this right?
139
140 !Merge scroll*2 with damage
141 RESET
142 damage 0..25,0..80
143 DAMAGEMERGE SCROLL
144
145 PUSH "\e[25H\r\nABCDE\b\b\b\e[2P\r\n"
146 sb_pushline 80 =
147 moverect 1..25,0..80 -> 0..24,0..80
148 damage 24..25,0..80 = 24<41 42 43 44 45>
149 moverect 24..25,4..80 -> 24..25,2..78
150 damage 24..25,78..80
151 sb_pushline 80 =
152 DAMAGEFLUSH
153 moverect 1..25,0..80 -> 0..24,0..80
154 damage 24..25,0..80
155 ?screen_chars 23,0,24,5 = 0x41,0x42,0x45