Skip to content

Commit 8632b82

Browse files
committed
infopane: DoKeyEvent: it is buggy, let's add a TODO for now
1 parent fade304 commit 8632b82

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

internal/action/infopane.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,20 @@ func (h *InfoPane) DoKeyEvent(e KeyEvent) bool {
143143
}
144144

145145
if !more {
146+
// If no infopane action found, try to find a bufpane action.
147+
//
148+
// TODO: this is buggy. For example, if the command bar has the following
149+
// two bindings:
150+
//
151+
// "<Ctrl-x><Ctrl-p>": "HistoryUp",
152+
// "<Ctrl-x><Ctrl-v>": "Paste",
153+
//
154+
// the 2nd binding (with a bufpane action) doesn't work, since <Ctrl-x>
155+
// has been already consumed by the 1st binding (with an infopane action).
156+
//
157+
// We should either iterate both InfoBindings and InfoBufBindings keytrees
158+
// together, or just use the same keytree for both infopane and bufpane
159+
// bindings.
146160
action, more = InfoBufBindings.NextEvent(e, nil)
147161
if action != nil && !more {
148162
action(h.BufPane)

0 commit comments

Comments
 (0)