comparison src/libvterm/t/harness.c @ 20488:1d595fada804 v8.2.0798

patch 8.2.0798: libvterm code lags behind the upstream version Commit: https://github.com/vim/vim/commit/be593bf135f6967335b14ba188bd5f8f32175c75 Author: Bram Moolenaar <Bram@vim.org> Date: Tue May 19 21:20:04 2020 +0200 patch 8.2.0798: libvterm code lags behind the upstream version Problem: Libvterm code lags behind the upstream version. Solution: Include revisions 755 - 758.
author Bram Moolenaar <Bram@vim.org>
date Tue, 19 May 2020 21:30:07 +0200
parents dc88c690f19b
children 747a270eb1db
comparison
equal deleted inserted replaced
20487:f4ada29cdf4b 20488:1d595fada804
151 printf("\n"); 151 printf("\n");
152 152
153 return 1; 153 return 1;
154 } 154 }
155 155
156 static int parser_osc(const char *command, size_t cmdlen, void *user UNUSED) 156 static int parser_osc(int command, VTermStringFragment frag, void *user UNUSED)
157 { 157 {
158 158
159 printf("osc "); 159 printf("osc ");
160 printhex(command, cmdlen); 160
161 if(frag.initial) {
162 if(command == -1)
163 printf("[");
164 else
165 printf("[%d;", command);
166 }
167
168 printhex(frag.str, frag.len);
169
170 if(frag.final)
171 printf("]");
172
161 printf("\n"); 173 printf("\n");
162 174
163 return 1; 175 return 1;
164 } 176 }
165 177
166 static int parser_dcs(const char *command, size_t cmdlen, void *user UNUSED) 178 static int parser_dcs(const char *command, size_t commandlen, VTermStringFragment frag, void *user UNUSED)
167 { 179 {
168
169 printf("dcs "); 180 printf("dcs ");
170 printhex(command, cmdlen); 181
182 if(frag.initial) {
183 size_t i;
184 printf("[");
185 for(i = 0; i < commandlen; i++)
186 printf("%02x", command[i]);
187 }
188
189 printhex(frag.str, frag.len);
190
191 if(frag.final)
192 printf("]");
193
171 printf("\n"); 194 printf("\n");
172 195
173 return 1; 196 return 1;
174 } 197 }
175 198
237 return 1; 260 return 1;
238 case VTERM_VALUETYPE_INT: 261 case VTERM_VALUETYPE_INT:
239 printf("settermprop %d %d\n", prop, val->number); 262 printf("settermprop %d %d\n", prop, val->number);
240 return 1; 263 return 1;
241 case VTERM_VALUETYPE_STRING: 264 case VTERM_VALUETYPE_STRING:
242 printf("settermprop %d \"%s\"\n", prop, val->string); 265 printf("settermprop %d %s\"%.*s\"%s\n", prop,
266 val->string.initial ? "[" : "", val->string.len, val->string.str, val->string.final ? "]" : "");
243 return 1; 267 return 1;
244 case VTERM_VALUETYPE_COLOR: 268 case VTERM_VALUETYPE_COLOR:
245 printf("settermprop %d rgb(%d,%d,%d)\n", prop, val->color.red, val->color.green, val->color.blue); 269 printf("settermprop %d rgb(%d,%d,%d)\n", prop, val->color.red, val->color.green, val->color.blue);
246 return 1; 270 return 1;
247 271
260 int i; 284 int i;
261 if(!want_state_putglyph) 285 if(!want_state_putglyph)
262 return 1; 286 return 1;
263 287
264 printf("putglyph "); 288 printf("putglyph ");
265 for(i = 0; info->chars[i]; i++) 289 for(i = 0; i < VTERM_MAX_CHARS_PER_CELL && info->chars[i]; i++)
266 printf(i ? ",%x" : "%x", info->chars[i]); 290 printf(i ? ",%x" : "%x", info->chars[i]);
267 printf(" %d %d,%d", info->width, pos.row, pos.col); 291 printf(" %d %d,%d", info->width, pos.row, pos.col);
268 if(info->protected_cell) 292 if(info->protected_cell)
269 printf(" prot"); 293 printf(" prot");
270 if(info->dwl) 294 if(info->dwl)