Skip to content

Commit

Permalink
fixes #716 Improve missing terminal error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Pearson committed Apr 2, 2024
1 parent e656a4a commit 4c86e60
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions terms_dynamic.go
Expand Up @@ -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
Expand Down

0 comments on commit 4c86e60

Please sign in to comment.