+// LuaFunctionMouseBinding is a function generator which takes the name of a lua function
+// and creates a function that will call that lua function
+// Specifically it creates a function that can be called as a mouse binding because this is used
+// to bind mouse actions to lua functions
+func LuaFunctionMouseBinding(function string) func(*View, bool, *tcell.EventMouse) bool {
+ return func(v *View, _ bool, e *tcell.EventMouse) bool {
+ _, err := Call(function, e)
+ if err != nil {
+ TermMessage(err)
+ }
+ return false
+ }
+}
+