Skip to content

Commit

Permalink
tscreen: Prefer dynamic over static builtin terminfo (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeKar authored Feb 5, 2024
1 parent 9699587 commit 8101443
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tscreen.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,13 @@ const (
// $COLUMNS environment variables can be set to the actual window size,
// otherwise defaults taken from the terminal database are used.
func NewTerminfoScreen() (Screen, error) {
ti, e := terminfo.LookupTerminfo(os.Getenv("TERM"))
ti, e := loadDynamicTerminfo(os.Getenv("TERM"))
if e != nil {
ti, e = loadDynamicTerminfo(os.Getenv("TERM"))
ti, e = terminfo.LookupTerminfo(os.Getenv("TERM"))
if e != nil {
return nil, e
}
} else {
terminfo.AddTerminfo(ti)
}
t := &tScreen{ti: ti}
Expand Down

0 comments on commit 8101443

Please sign in to comment.