From fe5df2334b8bcc085b4503ba09369f6365de5c76 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Wed, 25 Mar 2026 16:35:16 +0100 Subject: [PATCH] Document some of the methods of HasKeybindings We have some documentation for the corresponding setters in IBaseContext, but that's part of the controller infrastructure and not client facing. For somebody implementing a new view, this is where they will probably look for what methods they can override. --- pkg/gui/types/context.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/gui/types/context.go b/pkg/gui/types/context.go index da27dac1a..42c7ff293 100644 --- a/pkg/gui/types/context.go +++ b/pkg/gui/types/context.go @@ -246,7 +246,13 @@ type ( type HasKeybindings interface { GetKeybindings(opts KeybindingsOpts) []*Binding GetMouseKeybindings(opts KeybindingsOpts) []*gocui.ViewMouseBinding + + // Implement this to get called when there's a double-click on the view. Only supported by list + // views currently. Will be called after the double-clicked list entry has been selected. GetOnDoubleClick() func() error + + // Implement this in a side-panel controller to get called when there's a click in the main view + // that belongs to your panel while the main view is already focused. GetOnClickFocusedMainView() func(mainViewName string, clickedLineIdx int) error }