mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-15 22:26:40 +02:00
In this commit this is only possible by pressing '0' in a side panel; we'll add mouse clicking later in the branch. Also, you can't really do anything in the focused view except press escape to leave it again. We'll add some more functionality in a following commit.
31 lines
567 B
Go
31 lines
567 B
Go
package context
|
|
|
|
import (
|
|
"github.com/jesseduffield/gocui"
|
|
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
|
)
|
|
|
|
type MainContext struct {
|
|
*SimpleContext
|
|
}
|
|
|
|
func NewMainContext(
|
|
view *gocui.View,
|
|
windowName string,
|
|
key types.ContextKey,
|
|
) *MainContext {
|
|
ctx := &MainContext{
|
|
SimpleContext: NewSimpleContext(
|
|
NewBaseContext(NewBaseContextOpts{
|
|
Kind: types.MAIN_CONTEXT,
|
|
View: view,
|
|
WindowName: windowName,
|
|
Key: key,
|
|
Focusable: true,
|
|
HighlightOnFocus: false,
|
|
})),
|
|
}
|
|
|
|
return ctx
|
|
}
|