diff --git a/slit.go b/slit.go index e80e697..f54c56c 100644 --- a/slit.go +++ b/slit.go @@ -260,6 +260,9 @@ func (s *Slit) CanFitDisplay(ctx context.Context) bool { termbox.Init() w, h := termbox.Size() termbox.Close() + if w == 0 || h == 0 { + return false + } localCtx, cancel := context.WithCancel(ctx) parsedLineCount := 0 lines := s.fetcher.Get(localCtx, Pos{})