diff options
Diffstat (limited to 'src/nvim/buffer_defs.h')
-rw-r--r-- | src/nvim/buffer_defs.h | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/src/nvim/buffer_defs.h b/src/nvim/buffer_defs.h index d96b9355f1..559dffb945 100644 --- a/src/nvim/buffer_defs.h +++ b/src/nvim/buffer_defs.h @@ -12,11 +12,14 @@ typedef struct file_buffer buf_T; // Forward declaration // bufref_valid() only needs to check "buf" when the count differs. typedef struct { buf_T *br_buf; + int br_fnum; int br_buf_free_count; } bufref_T; // for garray_T #include "nvim/garray.h" +// for HLF_COUNT +#include "nvim/highlight_defs.h" // for pos_T, lpos_T and linenr_T #include "nvim/pos.h" // for the number window-local and buffer-local options @@ -103,8 +106,6 @@ typedef struct frame_S frame_T; // for bufhl_*_T #include "nvim/bufhl_defs.h" -typedef Map(linenr_T, bufhl_vec_T) bufhl_info_T; - #include "nvim/os/fs_defs.h" // for FileID #include "nvim/terminal.h" // for Terminal @@ -759,7 +760,9 @@ struct file_buffer { int b_mapped_ctrl_c; // modes where CTRL-C is mapped - bufhl_info_T *b_bufhl_info; // buffer stored highlights + BufhlInfo b_bufhl_info; // buffer stored highlights + + kvec_t(BufhlLine *) b_bufhl_move_space; // temporary space for highlights }; /* @@ -935,9 +938,13 @@ struct window_S { synblock_T *w_s; /* for :ownsyntax */ - int w_hl_id; ///< 'winhighlight' id - int w_hl_id_inactive; ///< 'winhighlight' id for inactive window - int w_hl_attr; ///< 'winhighlight' final attrs + int w_hl_id_normal; ///< 'winhighlight' normal id + int w_hl_attr_normal; ///< 'winhighlight' normal final attrs + + int w_hl_ids[HLF_COUNT]; ///< 'winhighlight' id + int w_hl_attrs[HLF_COUNT]; ///< 'winhighlight' final attrs + + int w_hl_needs_update; ///< attrs need to be recalculated win_T *w_prev; /* link to previous window */ win_T *w_next; /* link to next window */ @@ -1168,4 +1175,9 @@ struct window_S { qf_info_T *w_llist_ref; }; +static inline int win_hl_attr(win_T *wp, int hlf) +{ + return wp->w_hl_attrs[hlf]; +} + #endif // NVIM_BUFFER_DEFS_H |