mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-13 09:06:27 -04:00
When this was originally introduced, it handled single clicks on a list entry
(treating them similar to a double-click by checking whether the click was on
the selected entry). Arguably it should have been called OnDoubleClick back then
already; but when we later changed it to do actual double-click detection (see
37197b8e9a), we should have renamed the methods.
16 lines
629 B
Go
16 lines
629 B
Go
package controllers
|
|
|
|
import "github.com/jesseduffield/lazygit/pkg/gui/types"
|
|
|
|
func AttachControllers(context types.Context, controllers ...types.IController) {
|
|
for _, controller := range controllers {
|
|
context.AddKeybindingsFn(controller.GetKeybindings)
|
|
context.AddMouseKeybindingsFn(controller.GetMouseKeybindings)
|
|
context.AddOnDoubleClickFn(controller.GetOnDoubleClick())
|
|
context.AddOnClickFocusedMainViewFn(controller.GetOnClickFocusedMainView())
|
|
context.AddOnRenderToMainFn(controller.GetOnRenderToMain())
|
|
context.AddOnFocusFn(controller.GetOnFocus())
|
|
context.AddOnFocusLostFn(controller.GetOnFocusLost())
|
|
}
|
|
}
|