From 059a5c3b89feb6eaa0201eeb973de6a7861d990b Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Wed, 8 Jun 2016 14:38:15 -0400 Subject: [PATCH] Resize the view correctly when there is only one tab left --- cmd/micro/bindings.go | 4 ++++ cmd/micro/view.go | 2 ++ 2 files changed, 6 insertions(+) diff --git a/cmd/micro/bindings.go b/cmd/micro/bindings.go index 28e284fb..14de9ac5 100644 --- a/cmd/micro/bindings.go +++ b/cmd/micro/bindings.go @@ -1096,6 +1096,10 @@ func (v *View) Quit() bool { if curTab >= len(tabs) { curTab-- } + if curTab == 0 { + tab := tabs[curTab] + tab.views[tab.curView].Resize(screen.Size()) + } } } else { screen.Fini() diff --git a/cmd/micro/view.go b/cmd/micro/view.go index 6ecce7c9..0694b17f 100644 --- a/cmd/micro/view.go +++ b/cmd/micro/view.go @@ -127,6 +127,8 @@ func (v *View) Resize(w, h int) { // Include one line for the tab bar at the top h-- v.y = 1 + } else { + v.y = 0 } v.width = int(float32(w) * float32(v.widthPercent) / 100) // We subtract 1 for the statusline