Mercurial > vim
diff 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 |
line wrap: on
line diff
--- a/src/libvterm/src/vterm_internal.h +++ b/src/libvterm/src/vterm_internal.h @@ -160,15 +160,13 @@ struct VTermState unsigned int cursor_shape:2; } mode; } saved; + + /* Temporary state for DECRQSS parsing */ + union { + char decrqss[4]; + } tmp; }; -typedef enum { - VTERM_PARSER_OSC, - VTERM_PARSER_DCS, - - VTERM_N_PARSER_TYPES -} VTermParserStringType; - struct VTerm { VTermAllocatorFunctions *allocator; @@ -188,28 +186,39 @@ struct VTerm CSI_LEADER, CSI_ARGS, CSI_INTERMED, - ESC, + OSC_COMMAND, + DCS_COMMAND, // below here are the "string states" - STRING, - ESC_IN_STRING, + OSC, + DCS, } state; + unsigned int in_esc : 1; + int intermedlen; char intermed[INTERMED_MAX]; - int csi_leaderlen; - char csi_leader[CSI_LEADER_MAX]; + union { + struct { + int leaderlen; + char leader[CSI_LEADER_MAX]; - int csi_argi; - long csi_args[CSI_ARGS_MAX]; + int argi; + long args[CSI_ARGS_MAX]; + } csi; + struct { + int command; + } osc; + struct { + int commandlen; + char command[CSI_LEADER_MAX]; + } dcs; + } v; const VTermParserCallbacks *callbacks; void *cbdata; - VTermParserStringType stringtype; - char *strbuffer; - size_t strbuffer_len; - size_t strbuffer_cur; + int string_initial; } parser; // len == malloc()ed size; cur == number of valid bytes