Merge pull request #13892 from janlazo/vim-8.1.2285

vim-patch:8.1.2285
This commit is contained in:
Jan Edmund Lazo 2021-02-06 22:11:02 -05:00 committed by GitHub
commit b894fbcbe8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 25 additions and 28 deletions

View File

@ -296,13 +296,11 @@ typedef struct arglist {
int id; ///< id of this arglist int id; ///< id of this arglist
} alist_T; } alist_T;
/* // For each argument remember the file name as it was given, and the buffer
* For each argument remember the file name as it was given, and the buffer // number that contains the expanded file name (required for when ":cd" is
* number that contains the expanded file name (required for when ":cd" is // used).
* used. //
* // TODO(Felipe): move aentry_T to another header
* TODO: move aentry_T to another header
*/
typedef struct argentry { typedef struct argentry {
char_u *ae_fname; // file name as specified char_u *ae_fname; // file name as specified
int ae_fnum; // buffer number with expanded file name int ae_fnum; // buffer number with expanded file name
@ -1036,10 +1034,10 @@ struct matchitem {
int id; ///< match ID int id; ///< match ID
int priority; ///< match priority int priority; ///< match priority
char_u *pattern; ///< pattern to highlight char_u *pattern; ///< pattern to highlight
int hlg_id; ///< highlight group ID
regmmatch_T match; ///< regexp program for pattern regmmatch_T match; ///< regexp program for pattern
posmatch_T pos; ///< position matches posmatch_T pos; ///< position matches
match_T hl; ///< struct for doing the actual highlighting match_T hl; ///< struct for doing the actual highlighting
int hlg_id; ///< highlight group ID
int conceal_char; ///< cchar for Conceal highlighting int conceal_char; ///< cchar for Conceal highlighting
}; };

View File

@ -2121,9 +2121,10 @@ char_u *get_lval(char_u *const name, typval_T *const rettv,
return NULL; return NULL;
} }
} }
lp->ll_range = TRUE; lp->ll_range = true;
} else } else {
lp->ll_range = FALSE; lp->ll_range = false;
}
if (*p != ']') { if (*p != ']') {
if (!quiet) { if (!quiet) {
@ -2240,12 +2241,10 @@ char_u *get_lval(char_u *const name, typval_T *const rettv,
return NULL; return NULL;
} }
/* // May need to find the item or absolute index for the second
* May need to find the item or absolute index for the second // index of a range.
* index of a range. // When no index given: "lp->ll_empty2" is true.
* When no index given: "lp->ll_empty2" is TRUE. // Otherwise "lp->ll_n2" is set to the second index.
* Otherwise "lp->ll_n2" is set to the second index.
*/
if (lp->ll_range && !lp->ll_empty2) { if (lp->ll_range && !lp->ll_empty2) {
lp->ll_n2 = (long)tv_get_number(&var2); // Is number or string. lp->ll_n2 = (long)tv_get_number(&var2); // Is number or string.
tv_clear(&var2); tv_clear(&var2);

View File

@ -56,10 +56,10 @@ typedef struct lval_S {
///< isn't NULL it's the Dict to which to add the item. ///< isn't NULL it's the Dict to which to add the item.
listitem_T *ll_li; ///< The list item or NULL. listitem_T *ll_li; ///< The list item or NULL.
list_T *ll_list; ///< The list or NULL. list_T *ll_list; ///< The list or NULL.
int ll_range; ///< TRUE when a [i:j] range was used. bool ll_range; ///< true when a [i:j] range was used.
bool ll_empty2; ///< Second index is empty: [i:].
long ll_n1; ///< First index for list. long ll_n1; ///< First index for list.
long ll_n2; ///< Second index for list range. long ll_n2; ///< Second index for list range.
int ll_empty2; ///< Second index is empty: [i:].
dict_T *ll_dict; ///< The Dictionary or NULL. dict_T *ll_dict; ///< The Dictionary or NULL.
dictitem_T *ll_di; ///< The dictitem or NULL. dictitem_T *ll_di; ///< The dictitem or NULL.
char_u *ll_newkey; ///< New key for Dict in allocated memory or NULL. char_u *ll_newkey; ///< New key for Dict in allocated memory or NULL.

View File

@ -188,8 +188,8 @@ struct exarg {
// used for completion on the command line // used for completion on the command line
struct expand { struct expand {
int xp_context; // type of expansion
char_u *xp_pattern; // start of item to expand char_u *xp_pattern; // start of item to expand
int xp_context; // type of expansion
size_t xp_pattern_len; // bytes in xp_pattern before cursor size_t xp_pattern_len; // bytes in xp_pattern before cursor
char_u *xp_arg; // completion function char_u *xp_arg; // completion function
sctx_T xp_script_ctx; // SCTX for completion function sctx_T xp_script_ctx; // SCTX for completion function
@ -199,9 +199,9 @@ struct expand {
// characters need to be escaped // characters need to be escaped
#endif #endif
int xp_numfiles; // number of files found by file name completion int xp_numfiles; // number of files found by file name completion
int xp_col; // cursor position in line
char_u **xp_files; // list of files char_u **xp_files; // list of files
char_u *xp_line; // text being completed char_u *xp_line; // text being completed
int xp_col; // cursor position in line
}; };
// values for xp_backslash // values for xp_backslash

View File

@ -45,16 +45,16 @@ typedef struct memline {
memfile_T *ml_mfp; // pointer to associated memfile memfile_T *ml_mfp; // pointer to associated memfile
infoptr_T *ml_stack; // stack of pointer blocks (array of IPTRs)
int ml_stack_top; // current top of ml_stack
int ml_stack_size; // total number of entries in ml_stack
#define ML_EMPTY 1 // empty buffer #define ML_EMPTY 1 // empty buffer
#define ML_LINE_DIRTY 2 // cached line was changed and allocated #define ML_LINE_DIRTY 2 // cached line was changed and allocated
#define ML_LOCKED_DIRTY 4 // ml_locked was changed #define ML_LOCKED_DIRTY 4 // ml_locked was changed
#define ML_LOCKED_POS 8 // ml_locked needs positive block number #define ML_LOCKED_POS 8 // ml_locked needs positive block number
int ml_flags; int ml_flags;
infoptr_T *ml_stack; // stack of pointer blocks (array of IPTRs)
int ml_stack_top; // current top of ml_stack
int ml_stack_size; // total number of entries in ml_stack
linenr_T ml_line_lnum; // line number of cached line, 0 if not valid linenr_T ml_line_lnum; // line number of cached line, 0 if not valid
char_u *ml_line_ptr; // pointer to cached line char_u *ml_line_ptr; // pointer to cached line
size_t ml_line_offset; // cached byte offset of ml_line_lnum size_t ml_line_offset; // cached byte offset of ml_line_lnum

View File

@ -24,11 +24,11 @@ typedef struct signlist signlist_T;
struct signlist struct signlist
{ {
int id; // unique identifier for each placed sign int id; // unique identifier for each placed sign
linenr_T lnum; // line number which has this sign
int typenr; // typenr of sign int typenr; // typenr of sign
bool has_text_or_icon; // has text or icon
signgroup_T *group; // sign group
int priority; // priority for highlighting int priority; // priority for highlighting
bool has_text_or_icon; // has text or icon
linenr_T lnum; // line number which has this sign
signgroup_T *group; // sign group
signlist_T *next; // next signlist entry signlist_T *next; // next signlist entry
signlist_T *prev; // previous entry -- for easy reordering signlist_T *prev; // previous entry -- for easy reordering
}; };