mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-15 21:37:09 +09:00
infopane: DoKeyEvent: ignore action return value
It is not really defined what is the meaning of this return value. Currently this value is always true. And even if this value actually meant something (for example, the result of the last executed action in the chain), we should not use this value in HandleEvent(). The key event handling logic should behave the same regardless of whether the action triggered by this key succeeded or not.
This commit is contained in:
@@ -140,9 +140,9 @@ func (h *InfoPane) DoKeyEvent(e KeyEvent) bool {
|
|||||||
if !more {
|
if !more {
|
||||||
action, more = InfoBufBindings.NextEvent(e, nil)
|
action, more = InfoBufBindings.NextEvent(e, nil)
|
||||||
if action != nil && !more {
|
if action != nil && !more {
|
||||||
done := action(h.BufPane)
|
action(h.BufPane)
|
||||||
InfoBufBindings.ResetEvents()
|
InfoBufBindings.ResetEvents()
|
||||||
return done
|
return true
|
||||||
} else if action == nil && !more {
|
} else if action == nil && !more {
|
||||||
InfoBufBindings.ResetEvents()
|
InfoBufBindings.ResetEvents()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user