multigrid: rename grid->ScreenLines and other grid arrays

This commit is contained in:
Björn Linse
2018-12-31 13:29:58 +01:00
parent c778c2e107
commit c72d9ce0a6
9 changed files with 170 additions and 181 deletions

View File

@@ -13,7 +13,7 @@ typedef int16_t sattr_T;
/// ScreenGrid represents a resizable rectuangular grid displayed by UI clients.
///
/// ScreenLines contains the UTF-8 text that is currently displayed on the grid.
/// chars[] contains the UTF-8 text that is currently displayed on the grid.
/// It is stored as a single block of cells. When redrawing a part of the grid,
/// the new state can be compared with the existing state of the grid. This way
/// we can avoid sending bigger updates than neccessary to the Ul layer.
@@ -26,20 +26,20 @@ typedef int16_t sattr_T;
/// and the right cell should only contain the empty string. When a part of the
/// screen is cleared, the cells should be filled with a single whitespace char.
///
/// ScreenAttrs[] contains the highlighting attribute for each cell.
/// LineOffset[n] is the offset from ScreenLines[] and ScreenAttrs[] for the
/// attrs[] contains the highlighting attribute for each cell.
/// line_offset[n] is the offset from chars[] and attrs[] for the
/// start of line 'n'. These offsets are in general not linear, as full screen
/// scrolling is implemented by rotating the offsets in the LineOffset array.
/// LineWraps[] is an array of boolean flags indicating if the screen line wraps
/// to the next line. It can only be true if a window occupies the entire screen
/// width.
/// scrolling is implemented by rotating the offsets in the line_offset array.
/// line_wraps[] is an array of boolean flags indicating if the screen line
/// wraps to the next line. It can only be true if a window occupies the entire
/// screen width.
typedef struct {
handle_T handle;
schar_T *ScreenLines;
sattr_T *ScreenAttrs;
unsigned *LineOffset;
char_u *LineWraps;
schar_T *chars;
sattr_T *attrs;
unsigned *line_offset;
char_u *line_wraps;
// the size of the allocated grid.
int Rows;