Mercurial > vim
comparison src/syntax.c @ 32120:97255d909654 v9.0.1391
patch 9.0.1391: "clear" macros are not always used
Commit: https://github.com/vim/vim/commit/960dcbd098c761dd623bec9492d5391ff6e8dceb
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Tue Mar 7 17:45:11 2023 +0000
patch 9.0.1391: "clear" macros are not always used
Problem: "clear" macros are not always used.
Solution: Use ALLOC_ONE, VIM_CLEAR, CLEAR_POINTER and CLEAR_FIELD in more
places. (Yegappan Lakshmanan, closes #12104)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 07 Mar 2023 19:00:04 +0100 |
parents | 04d9dff67d99 |
children | 9e093c96dff6 |
comparison
equal
deleted
inserted
replaced
32119:241396c61b36 | 32120:97255d909654 |
---|---|
6285 char_u *new_value; | 6285 char_u *new_value; |
6286 | 6286 |
6287 if (curwin->w_s == &curwin->w_buffer->b_s) | 6287 if (curwin->w_s == &curwin->w_buffer->b_s) |
6288 { | 6288 { |
6289 curwin->w_s = ALLOC_ONE(synblock_T); | 6289 curwin->w_s = ALLOC_ONE(synblock_T); |
6290 memset(curwin->w_s, 0, sizeof(synblock_T)); | 6290 CLEAR_POINTER(curwin->w_s); |
6291 hash_init(&curwin->w_s->b_keywtab); | 6291 hash_init(&curwin->w_s->b_keywtab); |
6292 hash_init(&curwin->w_s->b_keywtab_ic); | 6292 hash_init(&curwin->w_s->b_keywtab_ic); |
6293 #ifdef FEAT_SPELL | 6293 #ifdef FEAT_SPELL |
6294 // TODO: keep the spell checking as it was. | 6294 // TODO: keep the spell checking as it was. |
6295 curwin->w_p_spell = FALSE; // No spell checking | 6295 curwin->w_p_spell = FALSE; // No spell checking |