diff options
Diffstat (limited to 'src/nvim/buffer_defs.h')
-rw-r--r-- | src/nvim/buffer_defs.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/nvim/buffer_defs.h b/src/nvim/buffer_defs.h index 4162df63ab..84d55fb730 100644 --- a/src/nvim/buffer_defs.h +++ b/src/nvim/buffer_defs.h @@ -255,6 +255,7 @@ struct wininfo_S { typedef struct arglist { garray_T al_ga; /* growarray with the array of file names */ int al_refcount; /* number of windows using this arglist */ + int id; ///< id of this arglist } alist_T; /* @@ -512,7 +513,7 @@ struct file_buffer { long b_mtime; /* last change time of original file */ long b_mtime_read; /* last change time when reading */ - off_t b_orig_size; /* size of original file in bytes */ + uint64_t b_orig_size; /* size of original file in bytes */ int b_orig_mode; /* mode of original file */ pos_T b_namedm[NMARKS]; /* current named marks (mark.c) */ @@ -880,6 +881,28 @@ typedef struct { proftime_T tm; /* for a time limit */ } match_T; +/// number of positions supported by matchaddpos() +#define MAXPOSMATCH 8 + +/// Same as lpos_T, but with additional field len. +typedef struct +{ + linenr_T lnum; ///< line number + colnr_T col; ///< column number + int len; ///< length: 0 - to the end of line +} llpos_T; + +/// posmatch_T provides an array for storing match items for matchaddpos() +/// function. +typedef struct posmatch posmatch_T; +struct posmatch +{ + llpos_T pos[MAXPOSMATCH]; ///< array of positions + int cur; ///< internal position counter + linenr_T toplnum; ///< top buffer line + linenr_T botlnum; ///< bottom buffer line +}; + /* * matchitem_T provides a linked list for storing match items for ":match" and * the match functions. @@ -892,6 +915,7 @@ struct matchitem { char_u *pattern; /* pattern to highlight */ int hlg_id; /* highlight group ID */ regmmatch_T match; /* regexp program for pattern */ + posmatch_T pos; // position matches match_T hl; /* struct for doing the actual highlighting */ }; |