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:
Dmytro Maluka 2024-04-24 22:50:00 +02:00
parent 18f3e1bf89
commit 8c7f63ac15

View file

@ -140,9 +140,9 @@ func (h *InfoPane) DoKeyEvent(e KeyEvent) bool {
if !more {
action, more = InfoBufBindings.NextEvent(e, nil)
if action != nil && !more {
done := action(h.BufPane)
action(h.BufPane)
InfoBufBindings.ResetEvents()
return done
return true
} else if action == nil && !more {
InfoBufBindings.ResetEvents()
}