Mercurial > vim
comparison src/testdir/test_syntax.vim @ 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 | ff21e2962490 |
children | 595ea7f099cd |
comparison
equal
deleted
inserted
replaced
22257:595568bd6795 | 22258:a6af570dad75 |
---|---|
426 func Test_ownsyntax() | 426 func Test_ownsyntax() |
427 new Xfoo | 427 new Xfoo |
428 call setline(1, '#define FOO') | 428 call setline(1, '#define FOO') |
429 syntax on | 429 syntax on |
430 set filetype=c | 430 set filetype=c |
431 | |
431 ownsyntax perl | 432 ownsyntax perl |
433 " this should not crash | |
434 set | |
435 | |
432 call assert_equal('perlComment', synIDattr(synID(line('.'), col('.'), 1), 'name')) | 436 call assert_equal('perlComment', synIDattr(synID(line('.'), col('.'), 1), 'name')) |
433 call assert_equal('c', b:current_syntax) | 437 call assert_equal('c', b:current_syntax) |
434 call assert_equal('perl', w:current_syntax) | 438 call assert_equal('perl', w:current_syntax) |
435 | 439 |
436 " A new split window should have the original syntax. | 440 " A new split window should have the original syntax. |