mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-30 06:37:14 +09:00
Add boolean option to actions to disable the lua callback
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user