mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 12:25:47 +02:00
Added screenMode configuration to gui configuration
This commit is contained in:
parent
c769a78db5
commit
f4ccb68464
3 changed files with 14 additions and 3 deletions
|
@ -277,7 +277,7 @@ func (gui *Gui) resetState(startArgs appTypes.StartArgs, reuseState bool) {
|
|||
contextTree := gui.contextTree()
|
||||
|
||||
initialContext := initialContext(contextTree, startArgs)
|
||||
initialScreenMode := initialScreenMode(startArgs)
|
||||
initialScreenMode := initialScreenMode(startArgs, gui.Config)
|
||||
|
||||
initialWindowViewNameMap := gui.initialWindowViewNameMap(contextTree)
|
||||
|
||||
|
@ -307,11 +307,20 @@ func (gui *Gui) resetState(startArgs appTypes.StartArgs, reuseState bool) {
|
|||
gui.RepoStateMap[Repo(currentDir)] = gui.State
|
||||
}
|
||||
|
||||
func initialScreenMode(startArgs appTypes.StartArgs) WindowMaximisation {
|
||||
func initialScreenMode(startArgs appTypes.StartArgs, config config.AppConfigurer) WindowMaximisation {
|
||||
if startArgs.FilterPath != "" || startArgs.GitArg != appTypes.GitArgNone {
|
||||
return SCREEN_HALF
|
||||
} else {
|
||||
return SCREEN_NORMAL
|
||||
defaultScreenMode := config.GetUserConfig().Gui.ScreenMode
|
||||
|
||||
switch defaultScreenMode {
|
||||
case "half":
|
||||
return SCREEN_HALF
|
||||
case "full":
|
||||
return SCREEN_FULL
|
||||
default:
|
||||
return SCREEN_NORMAL
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue