mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-16 22:07:09 +09:00
Resize the view correctly when there is only one tab left
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user