mirror of
https://github.com/neovim/neovim.git
synced 2025-10-15 06:16:08 +00:00
refactor: use CLEAR_FIELD and CLEAR_POINTER macros (#19709)
vim-patch:8.2.0559: clearing a struct is verbose
Problem: Clearing a struct is verbose.
Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER().
a80faa8930
This commit is contained in:
@@ -391,7 +391,7 @@ void decor_redraw_signs(buf_T *buf, int row, int *num_signs, sign_attrs_T sattrs
|
||||
sattrs[j] = sattrs[j - 1];
|
||||
}
|
||||
if (j < SIGN_SHOW_MAX) {
|
||||
memset(&sattrs[j], 0, sizeof(sign_attrs_T));
|
||||
CLEAR_FIELD(sattrs[j]);
|
||||
sattrs[j].sat_text = decor->sign_text;
|
||||
if (decor->sign_hl_id != 0) {
|
||||
sattrs[j].sat_texthl = syn_id2attr(decor->sign_hl_id);
|
||||
|
Reference in New Issue
Block a user