Skip to content

Commit

Permalink
Prevent non-function value from registering as callback
Browse files Browse the repository at this point in the history
Should fix #87
  • Loading branch information
cannorin committed Sep 3, 2024
1 parent 00099c3 commit 268955c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/fsharp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ endfunction
let s:callbacks = {}

function! fsharp#register_callback(fn)
if g:fsharp#backend != 'nvim'
if g:fsharp#backend != 'nvim' || type(a:fn) != v:t_func
return -1
endif
let rnd = reltimestr(reltime())
Expand Down

0 comments on commit 268955c

Please sign in to comment.