diff src/libvterm/include/vterm.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 9ad473b50471
children dc88c690f19b
line wrap: on
line diff
--- a/src/libvterm/include/vterm.h
+++ b/src/libvterm/include/vterm.h
@@ -268,6 +268,15 @@ void *vterm_parser_get_cbdata(VTerm *vt)
 // State layer
 // -----------
 
+/* Copies of VTermState fields that the 'resize' callback might have reason to
+ * edit. 'resize' callback gets total control of these fields and may
+ * free-and-reallocate them if required. They will be copied back from the
+ * struct after the callback has returned.
+ */
+typedef struct {
+  VTermPos pos;                /* current cursor position */
+} VTermStateFields;
+
 typedef struct {
   int (*putglyph)(VTermGlyphInfo *info, VTermPos pos, void *user);
   int (*movecursor)(VTermPos pos, VTermPos oldpos, int visible, void *user);
@@ -280,7 +289,7 @@ typedef struct {
   // was accepted, 0 otherwise.
   int (*settermprop)(VTermProp prop, VTermValue *val, void *user);
   int (*bell)(void *user);
-  int (*resize)(int rows, int cols, VTermPos *delta, void *user);
+  int (*resize)(int rows, int cols, VTermStateFields *fields, void *user);
   int (*setlineinfo)(int row, const VTermLineInfo *newinfo, const VTermLineInfo *oldinfo, void *user);
 } VTermStateCallbacks;