Pass the view into plugin callbacks

This commit is contained in:
Zachary Yedidia
2016-08-25 16:35:03 -04:00
parent ec0833b09c
commit d6da2dfeca
6 changed files with 145 additions and 150 deletions

View File

@@ -321,7 +321,7 @@ func (v *View) HandleEvent(event tcell.Event) {
v.Cursor.Right()
for _, pl := range loadedPlugins {
_, err := Call(pl+".onRune", string(e.Rune()))
_, err := Call(pl+".onRune", string(e.Rune()), v)
if err != nil && !strings.HasPrefix(err.Error(), "function does not exist") {
TermMessage(err)
}