-
I see in the What does Renaming that to Why an integer? Aren't we able to pass anything there? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
|
Beta Was this translation helpful? Give feedback.
Vim will call the function specified with the syntax
%N@SomeFunc@label%X
when clicking onlabel
. The call will be made with the signatureSomeFunc(minwid, nclicks, mbutton, mods)
. I have no control on how the call is made, and arbitrarily changing the signature because "it makes little sense to me", makes little sense to me. Also,SomeFunc
must be a global function, this is the main caveat! If multiple lua closures are registered with the nameSomeFunc
, each one will overwrite the previous one, hence each closure should have a different name, hugely polluting the global namespace. Another possibility is to add each closure to a global table, and the callback function simply usesminwid
to…