summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-02-03 21:43:16 +1100
committerJesse Duffield <jessedduffield@gmail.com>2020-02-03 21:50:31 +1100
commit5f71f874968e3e73d98b57801a4deb1c587da79c (patch)
tree106665f55d57d2101c8aaba8e14e105a2e71c1c7
parentc6cb90e8cad161c3636e7923bc34eae229955aea (diff)
correctly compare new main height to previous
-rw-r--r--pkg/gui/gui.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go
index d735b8418..371dfe7dd 100644
--- a/pkg/gui/gui.go
+++ b/pkg/gui/gui.go
@@ -489,7 +489,7 @@ func (gui *Gui) layout(g *gocui.Gui) error {
prevMainView, err := gui.g.View("main")
if err == nil {
_, prevMainHeight := prevMainView.Size()
- heightDiff := mainPanelBottom - prevMainHeight
+ heightDiff := mainPanelBottom - prevMainHeight - 1
if heightDiff > 0 {
if manager, ok := gui.viewBufferManagerMap["main"]; ok {
manager.ReadLines(heightDiff)