nvim-cmp icon indicating copy to clipboard operation
nvim-cmp copied to clipboard

fix(utils): Only call callback if type(callback) == "function"

Open iguanacucumber opened this issue 1 year ago • 2 comments

Sometimes the cursor freezes for a second and i get a error popup:

Error executing lua callback: ....../event.lua:47: attempt to call local 'callback' ( a table value ) 
Stack traceback:
....

so i fixed this, it's only a 3 line change

iguanacucumber avatar Sep 13 '24 14:09 iguanacucumber

i don't know what caused this issue (shouldn't happen) but either way it makes way more sense to just make this a type(callback)=="function" check

max397574 avatar Sep 13 '24 15:09 max397574