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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user