Add boolean option to actions to disable the lua callback

This commit is contained in:
Zachary Yedidia
2016-08-17 14:16:27 -04:00
parent 8a58506c72
commit d17cc0f628
11 changed files with 395 additions and 250 deletions

View File

@@ -170,7 +170,7 @@ func (v *View) CanClose(msg string) bool {
if strings.ToLower(quit) == "yes" || strings.ToLower(quit) == "y" {
return true
} else if strings.ToLower(quit) == "save" || strings.ToLower(quit) == "s" {
v.Save()
v.Save(true)
return true
}
}
@@ -330,7 +330,7 @@ func (v *View) HandleEvent(event tcell.Event) {
if e.Modifiers() == key.modifiers {
relocate = false
for _, action := range actions {
relocate = action(v) || relocate
relocate = action(v, true) || relocate
}
}
}