diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-08-31 14:49:15 +0200 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2022-08-31 21:15:04 +0200 |
commit | ba8be7446d440053b24358046e8e4033e3447633 (patch) | |
tree | c6cab8fcbf53fedc9057f3a4a7c92715b9661cd7 /src/nvim/highlight.h | |
parent | f078a3453ae479e4d6f88f874e8d282d63c798a3 (diff) | |
download | rneovim-ba8be7446d440053b24358046e8e4033e3447633.tar.gz rneovim-ba8be7446d440053b24358046e8e4033e3447633.tar.bz2 rneovim-ba8be7446d440053b24358046e8e4033e3447633.zip |
refactor(highlight): make hlattrs2dict always use pre-allocated dict
hlattrs2dict used to work with both allocated and unallocated
dicts which was quite messy. Now always delegate allocation to caller.
Diffstat (limited to 'src/nvim/highlight.h')
-rw-r--r-- | src/nvim/highlight.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/highlight.h b/src/nvim/highlight.h index 50299bb91c..e85e3859e2 100644 --- a/src/nvim/highlight.h +++ b/src/nvim/highlight.h @@ -19,6 +19,8 @@ static inline int win_hl_attr(win_T *wp, int hlf) return ((wp->w_ns_hl_attr && ns_hl_fast < 0) ? wp->w_ns_hl_attr : hl_attr_active)[hlf]; } +#define HLATTRS_DICT_SIZE 16 + #define HL_SET_DEFAULT_COLORS(rgb_fg, rgb_bg, rgb_sp) \ do { \ bool dark_ = (*p_bg == 'd'); \ |