Resize the view correctly when there is only one tab left

This commit is contained in:
Zachary Yedidia
2016-06-08 14:38:15 -04:00
parent 57f769c9a1
commit 059a5c3b89
2 changed files with 6 additions and 0 deletions

View File

@@ -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()

View File

@@ -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