1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

Fix focus issue when opening recent-repos menu at launch

I don't know why we were setting the initial context to CurrentSideContext
and not just CurrentContext in the first place. If there is no current context
in either case it'll default to the files context. So the only issue is if
we anticipated that some random context would be focused and we didn't want to
activate that. But I can't think of any situation where that would happen.
This commit is contained in:
Jesse Duffield
2023-06-07 17:41:17 +10:00
parent b6a31369da
commit c92e687d3b
6 changed files with 48 additions and 2 deletions

View File

@ -23,6 +23,7 @@ type IntegrationTest struct {
name string
description string
extraCmdArgs []string
extraEnvVars map[string]string
skip bool
setupRepo func(shell *Shell)
setupConfig func(config *config.AppConfig)
@ -47,7 +48,8 @@ type NewIntegrationTestArgs struct {
// additional args passed to lazygit
ExtraCmdArgs []string
// for when a test is flakey
Skip bool
ExtraEnvVars map[string]string
Skip bool
// to run a test only on certain git versions
GitVersion GitVersionRestriction
}
@ -112,6 +114,7 @@ func NewIntegrationTest(args NewIntegrationTestArgs) *IntegrationTest {
name: name,
description: args.Description,
extraCmdArgs: args.ExtraCmdArgs,
extraEnvVars: args.ExtraEnvVars,
skip: args.Skip,
setupRepo: args.SetupRepo,
setupConfig: args.SetupConfig,
@ -132,6 +135,10 @@ func (self *IntegrationTest) ExtraCmdArgs() []string {
return self.extraCmdArgs
}
func (self *IntegrationTest) ExtraEnvVars() map[string]string {
return self.extraEnvVars
}
func (self *IntegrationTest) Skip() bool {
return self.skip
}