closes #32 - maximized view follows console size

This commit is contained in:
Vladimir Markelov 2015-11-02 15:38:54 -08:00
parent f8520fc65e
commit 3b6f642b15
1 changed files with 6 additions and 0 deletions

View File

@ -452,8 +452,14 @@ func (c *Composer) MainLoop() {
case term.EventError:
panic(ev.Err)
case term.EventResize:
term.Flush()
c.width, c.height = term.Size()
c.initBuffer()
for _, view := range c.views {
if view.Maximized() {
view.SetSize(c.width, c.height)
}
}
c.refreshScreen(true)
}
case cmd := <-c.channel: