Fix SaveAs Lua callback

Fixes #1029
This commit is contained in:
Zachary Yedidia
2018-02-12 00:06:31 -05:00
parent 5b26702d5e
commit 397c29443a

View File

@@ -1016,7 +1016,7 @@ func (v *View) saveToFile(filename string) {
// SaveAs saves the buffer to disk with the given name
func (v *View) SaveAs(usePlugin bool) bool {
if v.mainCursor() {
if usePlugin && !PreActionCall("Find", v) {
if usePlugin && !PreActionCall("SaveAs", v) {
return false
}
@@ -1033,7 +1033,7 @@ func (v *View) SaveAs(usePlugin bool) bool {
}
if usePlugin {
PostActionCall("Find", v)
PostActionCall("SaveAs", v)
}
}
return false