comparison src/libvterm/src/vterm_internal.h @ 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 d0bf39eb2b07
children 747a270eb1db
comparison
equal deleted inserted replaced
20487:f4ada29cdf4b 20488:1d595fada804
158 unsigned int cursor_visible:1; 158 unsigned int cursor_visible:1;
159 unsigned int cursor_blink:1; 159 unsigned int cursor_blink:1;
160 unsigned int cursor_shape:2; 160 unsigned int cursor_shape:2;
161 } mode; 161 } mode;
162 } saved; 162 } saved;
163 }; 163
164 164 /* Temporary state for DECRQSS parsing */
165 typedef enum { 165 union {
166 VTERM_PARSER_OSC, 166 char decrqss[4];
167 VTERM_PARSER_DCS, 167 } tmp;
168 168 };
169 VTERM_N_PARSER_TYPES
170 } VTermParserStringType;
171 169
172 struct VTerm 170 struct VTerm
173 { 171 {
174 VTermAllocatorFunctions *allocator; 172 VTermAllocatorFunctions *allocator;
175 void *allocdata; 173 void *allocdata;
186 enum VTermParserState { 184 enum VTermParserState {
187 NORMAL, 185 NORMAL,
188 CSI_LEADER, 186 CSI_LEADER,
189 CSI_ARGS, 187 CSI_ARGS,
190 CSI_INTERMED, 188 CSI_INTERMED,
191 ESC, 189 OSC_COMMAND,
190 DCS_COMMAND,
192 // below here are the "string states" 191 // below here are the "string states"
193 STRING, 192 OSC,
194 ESC_IN_STRING, 193 DCS,
195 } state; 194 } state;
195
196 unsigned int in_esc : 1;
196 197
197 int intermedlen; 198 int intermedlen;
198 char intermed[INTERMED_MAX]; 199 char intermed[INTERMED_MAX];
199 200
200 int csi_leaderlen; 201 union {
201 char csi_leader[CSI_LEADER_MAX]; 202 struct {
202 203 int leaderlen;
203 int csi_argi; 204 char leader[CSI_LEADER_MAX];
204 long csi_args[CSI_ARGS_MAX]; 205
206 int argi;
207 long args[CSI_ARGS_MAX];
208 } csi;
209 struct {
210 int command;
211 } osc;
212 struct {
213 int commandlen;
214 char command[CSI_LEADER_MAX];
215 } dcs;
216 } v;
205 217
206 const VTermParserCallbacks *callbacks; 218 const VTermParserCallbacks *callbacks;
207 void *cbdata; 219 void *cbdata;
208 220
209 VTermParserStringType stringtype; 221 int string_initial;
210 char *strbuffer;
211 size_t strbuffer_len;
212 size_t strbuffer_cur;
213 } parser; 222 } parser;
214 223
215 // len == malloc()ed size; cur == number of valid bytes 224 // len == malloc()ed size; cur == number of valid bytes
216 225
217 VTermOutputCallback *outfunc; 226 VTermOutputCallback *outfunc;