diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2023-03-21 20:57:52 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2023-04-30 13:19:53 +1000 |
commit | 509e3efa70512ed34b90177eb17d6481664bb958 (patch) | |
tree | 663333126d6764706462271712583e4c8e93d786 /pkg/gui/controllers/command_log_controller.go | |
parent | 8edad826caf2fa48bfad33f9f8c4f3ba49a052da (diff) |
lots more refactoring
Diffstat (limited to 'pkg/gui/controllers/command_log_controller.go')
-rw-r--r-- | pkg/gui/controllers/command_log_controller.go | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/pkg/gui/controllers/command_log_controller.go b/pkg/gui/controllers/command_log_controller.go new file mode 100644 index 000000000..45520edd9 --- /dev/null +++ b/pkg/gui/controllers/command_log_controller.go @@ -0,0 +1,42 @@ +package controllers + +import ( + "github.com/jesseduffield/lazygit/pkg/gui/types" +) + +type CommandLogController struct { + baseController + *controllerCommon +} + +var _ types.IController = &CommandLogController{} + +func NewCommandLogController( + common *controllerCommon, +) *CommandLogController { + return &CommandLogController{ + baseController: baseController{}, + controllerCommon: common, + } +} + +func (self *CommandLogController) GetKeybindings(opts types.KeybindingsOpts) []*types.Binding { + bindings := []*types.Binding{} + + return bindings +} + +func (self *CommandLogController) GetOnFocusLost() func(types.OnFocusLostOpts) error { + return func(types.OnFocusLostOpts) error { + self.c.Views().Extras.Autoscroll = true + return nil + } +} + +func (self *CommandLogController) Context() types.Context { + return self.context() +} + +func (self *CommandLogController) context() types.Context { + return self.contexts.CommandLog +} |