Resize all tabs on EventResize

Fixes #552
This commit is contained in:
Zachary Yedidia
2017-02-20 13:08:14 -05:00
parent 7b03f5bab2
commit 263eec7368
2 changed files with 5 additions and 4 deletions

View File

@@ -11,13 +11,13 @@ import (
"time"
"github.com/go-errors/errors"
"layeh.com/gopher-luar"
"github.com/mattn/go-isatty"
"github.com/mitchellh/go-homedir"
"github.com/yuin/gopher-lua"
"github.com/zyedidia/clipboard"
"github.com/zyedidia/tcell"
"github.com/zyedidia/tcell/encoding"
"layeh.com/gopher-luar"
)
const (
@@ -433,6 +433,10 @@ func main() {
for event != nil {
switch e := event.(type) {
case *tcell.EventResize:
for _, t := range tabs {
t.Resize()
}
case *tcell.EventMouse:
if e.Buttons() == tcell.Button1 {
// If the user left clicked we check a couple things

View File

@@ -450,9 +450,6 @@ func (v *View) HandleEvent(event tcell.Event) {
v.Buf.CheckModTime()
switch e := event.(type) {
case *tcell.EventResize:
// Window resized
tabs[v.TabNum].Resize()
case *tcell.EventKey:
// Check first if input is a key binding, if it is we 'eat' the input and don't insert a rune
isBinding := false