/* vi:set ts=8 sts=4 sw=4:
*
* VIM - Vi IMproved by Bram Moolenaar
*
* Do ":help uganda" in Vim to read copying and usage conditions.
* Do ":help credits" in Vim to see a list of people who contributed.
*/
/*
* definition of global variables
*/
/*
* 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).
*/
EXTERN long Rows /* nr of rows in the screen */
#ifdef DO_INIT
# if defined(MSDOS) || defined(WIN3264) || defined(OS2)
= 25L
# else
= 24L
# endif
#endif
;
EXTERN long Columns INIT(= 80); /* nr of columns in the screen */
/*
* The characters that are currently on the screen are kept in ScreenLines[].
* It is a single block of characters, the size of the screen plus one line.
* The attributes for those characters are kept in ScreenAttrs[].
*
* "LineOffset[n]" is the offset from ScreenLines[] for the start of line 'n'.
* The same value is used for ScreenLinesUC[] and ScreenAttrs[].
*/
EXTERN schar_T *ScreenLines INIT(= NULL);
EXTERN sattr_T *ScreenAttrs INIT(= NULL);
EXTERN unsigned *LineOffset INIT(= NULL);
EXTERN char_u *LineWraps INIT(= NULL);
#ifdef FEAT_MBYTE
/*
* When using Unicode characters (in UTF-8 encoding) the character in
* ScreenLinesUC[] contains the Unicode for the character at this position, or
* NUL when the character in ScreenLines[] is to be used (ASCII char).
* The composing characters are to be drawn on top of the original character.
* Note: These three are only allocated when enc_utf8 is set!
*/
EXTERN u8char_T *ScreenLinesUC INIT(= NULL); /* decoded UTF-8 characters */
EXTERN u8char_T *ScreenLinesC1 INIT(= NULL); /* first composing char */
EXTERN u8char_T *ScreenLinesC2 INIT(= NULL); /* second composing char */
/* Only used for euc-jp: Second byte of a character that starts with 0x8e.
* These are single-width. */
EXTERN schar_T *ScreenLines2 INIT(= NULL);
#endif
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 KSMOD_* symbols that are read first.
*/
EXTERN int mod_mask INIT(= 0x0); /* current key modifiers */
/*
* Cmdline_row is the row where the command line starts, just below the
* last window.
* When the cmdline gets longer than the available space the screen gets
* scrolled up. After a CTRL-D (show matches), after hitting ':' after
* "hit return", and for the :global command, the command line is
* temporarily moved. The old position is restored with the next call to
* update_screen().
*/
EXTERN int cmdline_row;
EXTERN int