From 8c7f63ac15862bd8ecafbcafc5ec45d6e1b00fef Mon Sep 17 00:00:00 2001 From: Dmytro Maluka Date: Wed, 24 Apr 2024 22:50:00 +0200 Subject: [PATCH] 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. --- internal/action/infopane.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/action/infopane.go b/internal/action/infopane.go index a9baf431..c46faaf4 100644 --- a/internal/action/infopane.go +++ b/internal/action/infopane.go @@ -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() }