Skip to content

Commit c6c4346

Browse files
Merge pull request #2551 from stefanhaller/fix-initial-context-activation
2 parents ee9ae8f + d675117 commit c6c4346

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

pkg/gui/gui_common.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ func (self *guiCommon) IsCurrentContext(c types.Context) bool {
7474
return self.CurrentContext().GetKey() == c.GetKey()
7575
}
7676

77+
func (self *guiCommon) ActivateContext(context types.Context) error {
78+
return self.gui.activateContext(context, types.OnFocusOpts{})
79+
}
80+
7781
func (self *guiCommon) GetAppState() *config.AppState {
7882
return self.gui.Config.GetAppState()
7983
}

pkg/gui/layout.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ func (gui *Gui) onInitialViewsCreationForRepo() error {
182182
}
183183

184184
initialContext := gui.currentSideContext()
185-
if err := gui.c.PushContext(initialContext); err != nil {
185+
if err := gui.c.ActivateContext(initialContext); err != nil {
186186
return err
187187
}
188188

pkg/gui/types/common.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ type IGuiCommon interface {
4949
CurrentContext() Context
5050
CurrentStaticContext() Context
5151
IsCurrentContext(Context) bool
52+
ActivateContext(context Context) error
5253
// enters search mode for the current view
5354
OpenSearch()
5455

0 commit comments

Comments
 (0)