mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-30 14:47:16 +09:00
Add GetTabs Lua function
This commit is contained in:
@@ -398,6 +398,9 @@ func main() {
|
|||||||
// We give plugins access to a bunch of variables here which could be useful to them
|
// We give plugins access to a bunch of variables here which could be useful to them
|
||||||
L.SetGlobal("OS", luar.New(L, runtime.GOOS))
|
L.SetGlobal("OS", luar.New(L, runtime.GOOS))
|
||||||
L.SetGlobal("tabs", luar.New(L, tabs))
|
L.SetGlobal("tabs", luar.New(L, tabs))
|
||||||
|
L.SetGlobal("GetTabs", luar.New(L, func() []*Tab {
|
||||||
|
return tabs
|
||||||
|
}))
|
||||||
L.SetGlobal("curTab", luar.New(L, curTab))
|
L.SetGlobal("curTab", luar.New(L, curTab))
|
||||||
L.SetGlobal("messenger", luar.New(L, messenger))
|
L.SetGlobal("messenger", luar.New(L, messenger))
|
||||||
L.SetGlobal("GetOption", luar.New(L, GetOption))
|
L.SetGlobal("GetOption", luar.New(L, GetOption))
|
||||||
|
|||||||
Reference in New Issue
Block a user