mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-01-08 04:04:22 +02:00
hide view if not specified in dimensions object
This commit is contained in:
parent
dc183c0d82
commit
62a662054b
@ -73,8 +73,18 @@ func (gui *Gui) layout(g *gocui.Gui) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setViewFromDimensions := func(viewName string, boxName string, frame bool) (*gocui.View, error) {
|
setViewFromDimensions := func(viewName string, windowName string, frame bool) (*gocui.View, error) {
|
||||||
dimensionsObj := viewDimensions[boxName]
|
dimensionsObj, ok := viewDimensions[windowName]
|
||||||
|
|
||||||
|
if !ok {
|
||||||
|
// view not specified in dimensions object: so create the view and hide it
|
||||||
|
view, err := g.SetView(viewName, 0, 0, 0, 0, 0)
|
||||||
|
if err != nil {
|
||||||
|
return view, err
|
||||||
|
}
|
||||||
|
return g.SetViewOnBottom(viewName)
|
||||||
|
}
|
||||||
|
|
||||||
frameOffset := 1
|
frameOffset := 1
|
||||||
if frame {
|
if frame {
|
||||||
frameOffset = 0
|
frameOffset = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user