diff options
Diffstat (limited to 'src/nvim/globals.h')
-rw-r--r-- | src/nvim/globals.h | 53 |
1 files changed, 6 insertions, 47 deletions
diff --git a/src/nvim/globals.h b/src/nvim/globals.h index 04ff1320ce..f2bd6408e8 100644 --- a/src/nvim/globals.h +++ b/src/nvim/globals.h @@ -91,9 +91,10 @@ EXTERN struct nvim_stats_s { /* * Number of Rows and Columns in the screen. * Must be long to be able to use them as options in option.c. - * Note: Use screen_Rows and screen_Columns to access items in ScreenLines[]. - * They may have different values when the screen wasn't (re)allocated yet - * after setting Rows or Columns (e.g., when starting up). + * Note: Use default_grid.Rows and default_grid.Columns to access items in + * default_grid.chars[]. They may have different values when the screen + * wasn't (re)allocated yet after setting Rows or Columns (e.g., when starting + * up). */ #define DFLT_COLS 80 // default value for 'columns' #define DFLT_ROWS 24 // default value for 'lines' @@ -129,45 +130,6 @@ typedef off_t off_T; #endif /* - * The characters and attributes cached for the screen. - */ -typedef char_u schar_T[(MAX_MCO+1) * 4 + 1]; -typedef int16_t sattr_T; - -/// ScreenLines[] contains a copy of the whole screen, as it currently is -/// displayed. It is a single block of screen cells, the size of the screen -/// plus one line. The extra line used as a buffer while redrawing a window -/// line, so it can be compared with the previous state of that line. This way -/// we can avoid sending bigger updates than neccessary to the Ul layer. -/// -/// Screen cells are stored as NUL-terminated UTF-8 strings, and a cell can -/// contain up to MAX_MCO composing characters after the base character. -/// The composing characters are to be drawn on top of the original character. -/// The content after the NUL is not defined (so comparison must be done a -/// single cell at a time). Double-width characters are stored in the left cell, -/// 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 -/// 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. -/// -/// -/// Note: before the screen is initialized and when out of memory these can be -/// NULL. -EXTERN schar_T *ScreenLines INIT(= NULL); -EXTERN sattr_T *ScreenAttrs INIT(= NULL); -EXTERN unsigned *LineOffset INIT(= NULL); -EXTERN char_u *LineWraps INIT(= NULL); /* line wraps to next line */ - -EXTERN int screen_Rows INIT(= 0); /* actual size of ScreenLines[] */ -EXTERN int screen_Columns INIT(= 0); /* actual size of ScreenLines[] */ - -/* * When vgetc() is called, it sets mod_mask to the set of modifiers that are * held down based on the MOD_MASK_* symbols that are read first. */ @@ -228,11 +190,8 @@ EXTERN int compl_cont_status INIT(= 0); # define CONT_LOCAL 32 /* for ctrl_x_mode 0, ^X^P/^X^N do a local * expansion, (eg use complete=.) */ -/* - * Functions for putting characters in the command line, - * while keeping ScreenLines[] updated. - */ -EXTERN int cmdmsg_rl INIT(= FALSE); /* cmdline is drawn right to left */ +// state for putting characters in the message area +EXTERN int cmdmsg_rl INIT(= false); // cmdline is drawn right to left EXTERN int msg_col; EXTERN int msg_row; EXTERN int msg_scrolled; /* Number of screen lines that windows have |