From 8632b82cbee483c4d93612e69bd2733f437a8b25 Mon Sep 17 00:00:00 2001 From: Dmytro Maluka Date: Thu, 25 Apr 2024 00:28:11 +0200 Subject: [PATCH] infopane: DoKeyEvent: it is buggy, let's add a TODO for now --- internal/action/infopane.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/internal/action/infopane.go b/internal/action/infopane.go index bfb6002b..d3f30fd4 100644 --- a/internal/action/infopane.go +++ b/internal/action/infopane.go @@ -143,6 +143,20 @@ func (h *InfoPane) DoKeyEvent(e KeyEvent) bool { } if !more { + // If no infopane action found, try to find a bufpane action. + // + // TODO: this is buggy. For example, if the command bar has the following + // two bindings: + // + // "": "HistoryUp", + // "": "Paste", + // + // the 2nd binding (with a bufpane action) doesn't work, since + // has been already consumed by the 1st binding (with an infopane action). + // + // We should either iterate both InfoBindings and InfoBufBindings keytrees + // together, or just use the same keytree for both infopane and bufpane + // bindings. action, more = InfoBufBindings.NextEvent(e, nil) if action != nil && !more { action(h.BufPane)