Mercurial > vim
comparison src/syntax.c @ 22258:a6af570dad75 v8.2.1678
patch 8.2.1678: crash when using ":set" after ":ownsyntax"
Commit: https://github.com/vim/vim/commit/d1f76afaf963be706697279ab0570ffcb8a1f2fc
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Sep 13 22:37:34 2020 +0200
patch 8.2.1678: crash when using ":set" after ":ownsyntax"
Problem: Crash when using ":set" after ":ownsyntax".
Solution: Make sure 'spelloptions' is not NULL. (closes https://github.com/vim/vim/issues/6950)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 13 Sep 2020 22:45:03 +0200 |
parents | e35955a787a8 |
children | de6c242ec236 |
comparison
equal
deleted
inserted
replaced
22257:595568bd6795 | 22258:a6af570dad75 |
---|---|
6314 hash_init(&curwin->w_s->b_keywtab); | 6314 hash_init(&curwin->w_s->b_keywtab); |
6315 hash_init(&curwin->w_s->b_keywtab_ic); | 6315 hash_init(&curwin->w_s->b_keywtab_ic); |
6316 #ifdef FEAT_SPELL | 6316 #ifdef FEAT_SPELL |
6317 // TODO: keep the spell checking as it was. | 6317 // TODO: keep the spell checking as it was. |
6318 curwin->w_p_spell = FALSE; // No spell checking | 6318 curwin->w_p_spell = FALSE; // No spell checking |
6319 // make sure option values are "empty_option" instead of NULL | |
6319 clear_string_option(&curwin->w_s->b_p_spc); | 6320 clear_string_option(&curwin->w_s->b_p_spc); |
6320 clear_string_option(&curwin->w_s->b_p_spf); | 6321 clear_string_option(&curwin->w_s->b_p_spf); |
6321 clear_string_option(&curwin->w_s->b_p_spl); | 6322 clear_string_option(&curwin->w_s->b_p_spl); |
6323 clear_string_option(&curwin->w_s->b_p_spo); | |
6322 #endif | 6324 #endif |
6323 clear_string_option(&curwin->w_s->b_syn_isk); | 6325 clear_string_option(&curwin->w_s->b_syn_isk); |
6324 } | 6326 } |
6325 | 6327 |
6326 // save value of b:current_syntax | 6328 // save value of b:current_syntax |