Skip to content

Commit

Permalink
Allow file type to be passed into UltiSnips#FileTypeChanged()
Browse files Browse the repository at this point in the history
  • Loading branch information
tweekmonster committed Aug 4, 2016
1 parent e8c485e commit 104e571
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions autoload/UltiSnips.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
" setting. Without this fix moving the cursor will spam errors, with this
" it should not.
function! UltiSnips#FileTypeChanged()
function! UltiSnips#FileTypeChanged(...)
endfunction

finish
Expand Down Expand Up @@ -116,9 +116,9 @@ function! UltiSnips#JumpForwards()
return ""
endfunction

function! UltiSnips#FileTypeChanged()
function! UltiSnips#FileTypeChanged(...)
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 ""
endfunction

Expand Down

0 comments on commit 104e571

Please sign in to comment.