mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-28 22:08:12 +09:00
Add hooks for every action that's bindable
This commit is contained in:
@@ -9,7 +9,6 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/mitchellh/go-homedir"
|
||||
"github.com/yuin/gopher-lua"
|
||||
"github.com/zyedidia/clipboard"
|
||||
"github.com/zyedidia/tcell"
|
||||
)
|
||||
@@ -614,16 +613,6 @@ func (v *View) Save() bool {
|
||||
} else {
|
||||
messenger.Message("Saved " + v.Buf.Path)
|
||||
}
|
||||
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