mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-30 06:37:14 +09:00
Load plugins from ~/.config/micro/plugins
This commit is contained in:
@@ -620,14 +620,15 @@ func (v *View) Save() bool {
|
||||
v.GoSave()
|
||||
}
|
||||
}
|
||||
if err := L.CallByParam(lua.P{
|
||||
Fn: L.GetGlobal("onSave"),
|
||||
NRet: 0,
|
||||
Protect: true,
|
||||
}); err != nil {
|
||||
// The function isn't defined by this plugin
|
||||
messenger.Error(err)
|
||||
return true
|
||||
for _, pl := range loadedPlugins {
|
||||
if err := L.CallByParam(lua.P{
|
||||
Fn: L.GetGlobal(pl + "_onSave"),
|
||||
NRet: 0,
|
||||
Protect: true,
|
||||
}); err != nil {
|
||||
// The function isn't defined by this plugin
|
||||
messenger.Error(err)
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user