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 authored and gdamore committed Oct 6, 2024
1 parent fc16bf7 commit 36e7c8d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions terms_dynamic.go
Original file line number Diff line number Diff line change
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 36e7c8d

Please sign in to comment.