mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 23:31:51 +00:00
vim-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 vim/vim#747)
c3691332f7
This commit is contained in:
@@ -61,3 +61,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
|
||||
|
Reference in New Issue
Block a user