diff src/libvterm/src/vterm_internal.h @ 20480:d0bf39eb2b07 v8.2.0794

patch 8.2.0794: libvterm code lags behind the upstream version Commit: https://github.com/vim/vim/commit/d098b824c10cc20dc55e18c22c4991f61826006e Author: Bram Moolenaar <Bram@vim.org> Date: Mon May 18 21:12:59 2020 +0200 patch 8.2.0794: libvterm code lags behind the upstream version Problem: Libvterm code lags behind the upstream version. Solution: Include revisions 743 - 747.
author Bram Moolenaar <Bram@vim.org>
date Mon, 18 May 2020 21:15:04 +0200
parents c15dd3da4f47
children 1d595fada804
line wrap: on
line diff
--- a/src/libvterm/src/vterm_internal.h
+++ b/src/libvterm/src/vterm_internal.h
@@ -32,6 +32,9 @@
 #define CSI_ARGS_MAX 16
 #define CSI_LEADER_MAX 16
 
+#define BUFIDX_PRIMARY   0
+#define BUFIDX_ALTSCREEN 1
+
 typedef struct VTermEncoding VTermEncoding;
 
 typedef struct {
@@ -92,6 +95,10 @@ struct VTermState
   // Bitvector of tab stops
   unsigned char *tabstops;
 
+  /* Primary and Altscreen; lineinfos[1] is lazily allocated as needed */
+  VTermLineInfo *lineinfos[2];
+
+  /* lineinfo will == lineinfos[0] or lineinfos[1], depending on altscreen */
   VTermLineInfo *lineinfo;
 #define ROWWIDTH(state,row) ((state)->lineinfo[(row)].doublewidth ? ((state)->cols / 2) : (state)->cols)
 #define THISROWWIDTH(state) ROWWIDTH(state, (state)->pos.row)