mirror of
https://github.com/neovim/neovim.git
synced 2025-09-25 04:28:33 +00:00
vim-patch:7.4.828
Problem: Crash when using "syn keyword x c". (Dominique Pelle)
Solution: Initialize the keyword tabble. (Raymond Ko, PR 397)
670acbc70f
---
see: "fix crash due to hash table not being initialized"
https://github.com/vim/vim/pull/397
To reproduce:
```sh
nvim -u NONE -c ow -c 'sy keyword x c'
```
This commit is contained in:
@@ -5406,8 +5406,10 @@ void ex_ownsyntax(exarg_T *eap)
|
|||||||
if (curwin->w_s == &curwin->w_buffer->b_s) {
|
if (curwin->w_s == &curwin->w_buffer->b_s) {
|
||||||
curwin->w_s = xmalloc(sizeof(synblock_T));
|
curwin->w_s = xmalloc(sizeof(synblock_T));
|
||||||
memset(curwin->w_s, 0, sizeof(synblock_T));
|
memset(curwin->w_s, 0, sizeof(synblock_T));
|
||||||
// TODO: Keep the spell checking as it was.
|
hash_init(&curwin->w_s->b_keywtab);
|
||||||
curwin->w_p_spell = FALSE; /* No spell checking */
|
hash_init(&curwin->w_s->b_keywtab_ic);
|
||||||
|
// TODO: Keep the spell checking as it was. NOLINT(readability/todo)
|
||||||
|
curwin->w_p_spell = false; // No spell checking
|
||||||
clear_string_option(&curwin->w_s->b_p_spc);
|
clear_string_option(&curwin->w_s->b_p_spc);
|
||||||
clear_string_option(&curwin->w_s->b_p_spf);
|
clear_string_option(&curwin->w_s->b_p_spf);
|
||||||
clear_string_option(&curwin->w_s->b_p_spl);
|
clear_string_option(&curwin->w_s->b_p_spl);
|
||||||
|
@@ -460,7 +460,7 @@ static int included_patches[] = {
|
|||||||
// 831,
|
// 831,
|
||||||
// 830,
|
// 830,
|
||||||
// 829 NA
|
// 829 NA
|
||||||
// 828,
|
828,
|
||||||
// 827,
|
// 827,
|
||||||
826,
|
826,
|
||||||
825,
|
825,
|
||||||
|
Reference in New Issue
Block a user