diff --git a/getline.go b/getline.go index 597ac99..dc53667 100644 --- a/getline.go +++ b/getline.go @@ -33,8 +33,9 @@ var _ tea.Model = (*Editor)(nil) func (m *Editor) Update(imsg tea.Msg) (tea.Model, tea.Cmd) { switch msg := imsg.(type) { case tea.WindowSizeMsg: - m.Model.SetSize(msg.Width, msg.Height) - + if msg.Width != 0 || msg.Height != 0 { + m.Model.SetSize(msg.Width, msg.Height) + } case editline.InputCompleteMsg: return m, tea.Quit }