Mercurial > vim
comparison src/libvterm/src/vterm_internal.h @ 20518:a4652d7ec99f v8.2.0813
patch 8.2.0813: libvterm code is slightly different from upstream
Commit: https://github.com/vim/vim/commit/591cec8366e87a172495c362477cbf5de8d399f0
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri May 22 22:06:06 2020 +0200
patch 8.2.0813: libvterm code is slightly different from upstream
Problem: libvterm code is slightly different from upstream.
Solution: Use upstream text to avoid future merge problems. Mainly comment
style changes.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 22 May 2020 22:15:04 +0200 |
parents | 03826c672315 |
children | f93337ae0612 |
comparison
equal
deleted
inserted
replaced
20517:a7c6cd0d7ba0 | 20518:a4652d7ec99f |
---|---|
53 unsigned int italic:1; | 53 unsigned int italic:1; |
54 unsigned int blink:1; | 54 unsigned int blink:1; |
55 unsigned int reverse:1; | 55 unsigned int reverse:1; |
56 unsigned int conceal:1; | 56 unsigned int conceal:1; |
57 unsigned int strike:1; | 57 unsigned int strike:1; |
58 unsigned int font:4; // To store 0-9 | 58 unsigned int font:4; /* To store 0-9 */ |
59 }; | 59 }; |
60 | 60 |
61 struct VTermState | 61 struct VTermState |
62 { | 62 { |
63 VTerm *vt; | 63 VTerm *vt; |
69 void *fbdata; | 69 void *fbdata; |
70 | 70 |
71 int rows; | 71 int rows; |
72 int cols; | 72 int cols; |
73 | 73 |
74 // Current cursor position | 74 /* Current cursor position */ |
75 VTermPos pos; | 75 VTermPos pos; |
76 | 76 |
77 int at_phantom; // True if we're on the "81st" phantom column to defer a wraparound | 77 int at_phantom; /* True if we're on the "81st" phantom column to defer a wraparound */ |
78 | 78 |
79 int scrollregion_top; | 79 int scrollregion_top; |
80 int scrollregion_bottom; // -1 means unbounded | 80 int scrollregion_bottom; /* -1 means unbounded */ |
81 #define SCROLLREGION_BOTTOM(state) ((state)->scrollregion_bottom > -1 ? (state)->scrollregion_bottom : (state)->rows) | 81 #define SCROLLREGION_BOTTOM(state) ((state)->scrollregion_bottom > -1 ? (state)->scrollregion_bottom : (state)->rows) |
82 int scrollregion_left; | 82 int scrollregion_left; |
83 #define SCROLLREGION_LEFT(state) ((state)->mode.leftrightmargin ? (state)->scrollregion_left : 0) | 83 #define SCROLLREGION_LEFT(state) ((state)->mode.leftrightmargin ? (state)->scrollregion_left : 0) |
84 int scrollregion_right; // -1 means unbounded | 84 int scrollregion_right; /* -1 means unbounded */ |
85 #define SCROLLREGION_RIGHT(state) ((state)->mode.leftrightmargin && (state)->scrollregion_right > -1 ? (state)->scrollregion_right : (state)->cols) | 85 #define SCROLLREGION_RIGHT(state) ((state)->mode.leftrightmargin && (state)->scrollregion_right > -1 ? (state)->scrollregion_right : (state)->cols) |
86 | 86 |
87 // Bitvector of tab stops | 87 /* Bitvector of tab stops */ |
88 unsigned char *tabstops; | 88 unsigned char *tabstops; |
89 | 89 |
90 /* Primary and Altscreen; lineinfos[1] is lazily allocated as needed */ | 90 /* Primary and Altscreen; lineinfos[1] is lazily allocated as needed */ |
91 VTermLineInfo *lineinfos[2]; | 91 VTermLineInfo *lineinfos[2]; |
92 | 92 |
93 /* lineinfo will == lineinfos[0] or lineinfos[1], depending on altscreen */ | 93 /* lineinfo will == lineinfos[0] or lineinfos[1], depending on altscreen */ |
94 VTermLineInfo *lineinfo; | 94 VTermLineInfo *lineinfo; |
95 #define ROWWIDTH(state,row) ((state)->lineinfo[(row)].doublewidth ? ((state)->cols / 2) : (state)->cols) | 95 #define ROWWIDTH(state,row) ((state)->lineinfo[(row)].doublewidth ? ((state)->cols / 2) : (state)->cols) |
96 #define THISROWWIDTH(state) ROWWIDTH(state, (state)->pos.row) | 96 #define THISROWWIDTH(state) ROWWIDTH(state, (state)->pos.row) |
97 | 97 |
98 // Mouse state | 98 /* Mouse state */ |
99 int mouse_col, mouse_row; | 99 int mouse_col, mouse_row; |
100 int mouse_buttons; | 100 int mouse_buttons; |
101 int mouse_flags; | 101 int mouse_flags; |
102 | 102 |
103 enum { MOUSE_X10, MOUSE_UTF8, MOUSE_SGR, MOUSE_RXVT } mouse_protocol; | 103 enum { MOUSE_X10, MOUSE_UTF8, MOUSE_SGR, MOUSE_RXVT } mouse_protocol; |
104 | 104 |
105 // Last glyph output, for Unicode recombining purposes | 105 /* Last glyph output, for Unicode recombining purposes */ |
106 uint32_t *combine_chars; | 106 uint32_t *combine_chars; |
107 size_t combine_chars_size; // Number of ELEMENTS in the above | 107 size_t combine_chars_size; // Number of ELEMENTS in the above |
108 int combine_width; // The width of the glyph above | 108 int combine_width; // The width of the glyph above |
109 VTermPos combine_pos; // Position before movement | 109 VTermPos combine_pos; // Position before movement |
110 | 110 |
137 | 137 |
138 int bold_is_highbright; | 138 int bold_is_highbright; |
139 | 139 |
140 unsigned int protected_cell : 1; | 140 unsigned int protected_cell : 1; |
141 | 141 |
142 // Saved state under DEC mode 1048/1049 | 142 /* Saved state under DEC mode 1048/1049 */ |
143 struct { | 143 struct { |
144 VTermPos pos; | 144 VTermPos pos; |
145 struct VTermPen pen; | 145 struct VTermPen pen; |
146 | 146 |
147 struct { | 147 struct { |
209 void *cbdata; | 209 void *cbdata; |
210 | 210 |
211 int string_initial; | 211 int string_initial; |
212 } parser; | 212 } parser; |
213 | 213 |
214 // len == malloc()ed size; cur == number of valid bytes | 214 /* len == malloc()ed size; cur == number of valid bytes */ |
215 | 215 |
216 VTermOutputCallback *outfunc; | 216 VTermOutputCallback *outfunc; |
217 void *outdata; | 217 void *outdata; |
218 | 218 |
219 char *outbuffer; | 219 char *outbuffer; |