Allow file type to be passed into UltiSnips#FileTypeChanged()
This commit is contained in:
parent
e8c485eb3c
commit
104e571c4a
@ -3,7 +3,7 @@ if exists("b:did_autoload_ultisnips") || !exists("g:_uspy")
|
|||||||
" TODO(sirver): Add a test for that using a bad g:UltiSnipsPythonVersion
|
" TODO(sirver): Add a test for that using a bad g:UltiSnipsPythonVersion
|
||||||
" setting. Without this fix moving the cursor will spam errors, with this
|
" setting. Without this fix moving the cursor will spam errors, with this
|
||||||
" it should not.
|
" it should not.
|
||||||
function! UltiSnips#FileTypeChanged()
|
function! UltiSnips#FileTypeChanged(...)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
finish
|
finish
|
||||||
@ -116,9 +116,9 @@ function! UltiSnips#JumpForwards()
|
|||||||
return ""
|
return ""
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! UltiSnips#FileTypeChanged()
|
function! UltiSnips#FileTypeChanged(...)
|
||||||
exec g:_uspy "UltiSnips_Manager.reset_buffer_filetypes()"
|
exec g:_uspy "UltiSnips_Manager.reset_buffer_filetypes()"
|
||||||
exec g:_uspy "UltiSnips_Manager.add_buffer_filetypes('" . &ft . "')"
|
exec g:_uspy "UltiSnips_Manager.add_buffer_filetypes('" . (a:0 ? a:1 : &ft) . "')"
|
||||||
return ""
|
return ""
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user