Skip to content

Commit 8c7f63a

Browse files
committed
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.
1 parent 18f3e1b commit 8c7f63a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/action/infopane.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ func (h *InfoPane) DoKeyEvent(e KeyEvent) bool {
140140
if !more {
141141
action, more = InfoBufBindings.NextEvent(e, nil)
142142
if action != nil && !more {
143-
done := action(h.BufPane)
143+
action(h.BufPane)
144144
InfoBufBindings.ResetEvents()
145-
return done
145+
return true
146146
} else if action == nil && !more {
147147
InfoBufBindings.ResetEvents()
148148
}

0 commit comments

Comments
 (0)