diff --git a/cmd/micro/micro.go b/cmd/micro/micro.go index f22634db..9c23f3ba 100644 --- a/cmd/micro/micro.go +++ b/cmd/micro/micro.go @@ -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 diff --git a/cmd/micro/view.go b/cmd/micro/view.go index 1f13acc7..1c3b42ba 100644 --- a/cmd/micro/view.go +++ b/cmd/micro/view.go @@ -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