0
0
mirror of https://github.com/vim/vim.git synced 2025-11-14 23:04:02 -05:00

patch 7.4.1754

Problem:    When 'filetype' was set and reloading a buffer which does not
            cause it to be set, the syntax isn't loaded. (KillTheMule)
Solution:   Remember whether the FileType event was fired and fire it if not.
            (Anton Lindqvist, closes #747)
This commit is contained in:
Bram Moolenaar
2016-04-20 12:49:49 +02:00
parent c020042083
commit c3691332f7
3 changed files with 45 additions and 0 deletions

View File

@@ -65,3 +65,18 @@ func Test_syn_iskeyword()
quit!
endfunc
func Test_syntax_after_reload()
split Xsomefile
call setline(1, ['hello', 'there'])
w!
only!
setl filetype=hello
au FileType hello let g:gotit = 1
call assert_false(exists('g:gotit'))
edit other
buf Xsomefile
call assert_equal('hello', &filetype)
call assert_true(exists('g:gotit'))
call delete('Xsomefile')
endfunc