diff --git a/terms_dynamic.go b/terms_dynamic.go index f552b0e..9e54944 100644 --- a/terms_dynamic.go +++ b/terms_dynamic.go @@ -27,9 +27,14 @@ import ( // will be automatically included anyway. "github.com/gdamore/tcell/v2/terminfo" "github.com/gdamore/tcell/v2/terminfo/dynamic" + + "fmt" ) func loadDynamicTerminfo(term string) (*terminfo.Terminfo, error) { + if term == "" { + return nil, fmt.Errorf("%w: term not set", ErrTermNotFound) + } ti, _, e := dynamic.LoadTerminfo(term) if e != nil { return nil, e