To: vim_dev@googlegroups.com Subject: Patch 8.2.1678 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1678 Problem: Crash when using ":set" after ":ownsyntax". (Dhiraj Mishra) Solution: Make sure 'spelloptions' is not NULL. (closes #6950) Files: src/syntax.c, src/testdir/test_syntax.vim *** ../vim-8.2.1677/src/syntax.c 2020-07-10 20:30:10.076325216 +0200 --- src/syntax.c 2020-09-13 22:34:25.192704059 +0200 *************** *** 6316,6324 **** --- 6316,6326 ---- #ifdef FEAT_SPELL // TODO: keep the spell checking as it was. curwin->w_p_spell = FALSE; // No spell checking + // make sure option values are "empty_option" instead of NULL 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_spl); + clear_string_option(&curwin->w_s->b_p_spo); #endif clear_string_option(&curwin->w_s->b_syn_isk); } *** ../vim-8.2.1677/src/testdir/test_syntax.vim 2020-09-04 21:18:40.488161918 +0200 --- src/testdir/test_syntax.vim 2020-09-13 22:36:26.180361732 +0200 *************** *** 428,434 **** --- 428,438 ---- call setline(1, '#define FOO') syntax on set filetype=c + ownsyntax perl + " this should not crash + set + call assert_equal('perlComment', synIDattr(synID(line('.'), col('.'), 1), 'name')) call assert_equal('c', b:current_syntax) call assert_equal('perl', w:current_syntax) *** ../vim-8.2.1677/src/version.c 2020-09-13 22:21:18.843009309 +0200 --- src/version.c 2020-09-13 22:37:16.856215775 +0200 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 1678, /**/ -- Females are strictly forbidden to appear unshaven in public. [real standing law in New Mexico, United States of America] /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///