diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-15 08:28:02 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-15 09:04:40 +1000 |
commit | 1e12a60b346f373b53edf5aa3721f9b5e6ee574f (patch) | |
tree | 96d3672e7635783df4bb18651cf1992ed36bf106 /pkg/gui/layout.go | |
parent | 8430b04492e74b760fc92fc65a619e46e61d3a6a (diff) |
move box layout stuff into its own package
Diffstat (limited to 'pkg/gui/layout.go')
-rw-r--r-- | pkg/gui/layout.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/gui/layout.go b/pkg/gui/layout.go index 1fa949b48..9f49c0d25 100644 --- a/pkg/gui/layout.go +++ b/pkg/gui/layout.go @@ -123,7 +123,7 @@ func (gui *Gui) layout(g *gocui.Gui) error { prevMainView, err := gui.g.View("main") if err == nil { _, prevMainHeight := prevMainView.Size() - newMainHeight := viewDimensions["main"].y1 - viewDimensions["main"].y0 - 1 + newMainHeight := viewDimensions["main"].Y1 - viewDimensions["main"].Y0 - 1 heightDiff := newMainHeight - prevMainHeight if heightDiff > 0 { if manager, ok := gui.viewBufferManagerMap["main"]; ok { @@ -143,10 +143,10 @@ func (gui *Gui) layout(g *gocui.Gui) error { } return g.SetView( viewName, - dimensionsObj.x0-frameOffset, - dimensionsObj.y0-frameOffset, - dimensionsObj.x1+frameOffset, - dimensionsObj.y1+frameOffset, + dimensionsObj.X0-frameOffset, + dimensionsObj.Y0-frameOffset, + dimensionsObj.X1+frameOffset, + dimensionsObj.Y1+frameOffset, 0, ) } |