diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-05 00:31:52 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-06 19:34:32 +1000 |
commit | 39ae122304868a4de60659291e9220b4bab2dde1 (patch) | |
tree | 41a86ece1287aed985015a3c17949af52735945e /pkg/gui/layout.go | |
parent | c34c6926d5e1f5a49b90b7a8979bbb0919f00f38 (diff) |
more refactoring
Diffstat (limited to 'pkg/gui/layout.go')
-rw-r--r-- | pkg/gui/layout.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/gui/layout.go b/pkg/gui/layout.go index d319873c7..bf2954fb7 100644 --- a/pkg/gui/layout.go +++ b/pkg/gui/layout.go @@ -48,8 +48,8 @@ func (gui *Gui) layout(g *gocui.Gui) error { viewDimensions := gui.getWindowDimensions(informationStr, appStatus) // reading more lines into main view buffers upon resize - prevMainView, err := gui.g.View("main") - if err == nil { + prevMainView := gui.Views.Main + if prevMainView != nil { _, prevMainHeight := prevMainView.Size() newMainHeight := viewDimensions["main"].Y1 - viewDimensions["main"].Y0 - 1 heightDiff := newMainHeight - prevMainHeight @@ -230,7 +230,7 @@ func (gui *Gui) layout(g *gocui.Gui) error { gui.Views.Information.BgColor = gocui.ColorDefault gui.Views.Information.FgColor = gocui.ColorGreen gui.Views.Information.Frame = false - gui.renderString("information", INFO_SECTION_PADDING+informationStr) + gui.renderString(gui.Views.Information, INFO_SECTION_PADDING+informationStr) } if gui.State.OldInformation != informationStr { gui.setViewContent(gui.Views.Information, informationStr) |