1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-05 00:59:19 +02:00

various changes to improve integration tests

This commit is contained in:
Jesse Duffield
2022-09-09 21:11:05 -07:00
parent 7b757d1cfe
commit 7af7af27c6
103 changed files with 2883 additions and 1525 deletions

View File

@ -206,6 +206,16 @@ func NewGui(mode OutputMode, supportOverlaps bool, playMode PlayMode, headless b
return nil, err
}
if headless || runtime.GOOS == "windows" {
g.maxX, g.maxY = g.screen.Size()
} else {
// TODO: find out if we actually need this bespoke logic for linux
g.maxX, g.maxY, err = g.getTermWindowSize()
if err != nil {
return nil, err
}
}
g.outputMode = mode
g.stop = make(chan struct{})
@ -225,15 +235,6 @@ func NewGui(mode OutputMode, supportOverlaps bool, playMode PlayMode, headless b
}
}
if runtime.GOOS != "windows" {
g.maxX, g.maxY, err = g.getTermWindowSize()
if err != nil {
return nil, err
}
} else {
g.maxX, g.maxY = Screen.Size()
}
g.BgColor, g.FgColor, g.FrameColor = ColorDefault, ColorDefault, ColorDefault
g.SelBgColor, g.SelFgColor, g.SelFrameColor = ColorDefault, ColorDefault, ColorDefault