Add hooks for every action that's bindable

This commit is contained in:
Zachary Yedidia
2016-04-27 14:37:58 -04:00
parent a333f0ade2
commit d933efc53d
3 changed files with 26 additions and 11 deletions

View File

@@ -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
}