From 20b65d615fd8bcf11b999221173d3f309c9be674 Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Sun, 3 Dec 2023 17:40:31 -0600 Subject: [PATCH] Fix dynamic terminfo when an alias is used (#639) Co-authored-by: Garrett D'Amore --- terminfo/dynamic/dynamic.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/terminfo/dynamic/dynamic.go b/terminfo/dynamic/dynamic.go index 5340715..047ebde 100644 --- a/terminfo/dynamic/dynamic.go +++ b/terminfo/dynamic/dynamic.go @@ -185,16 +185,10 @@ func (tc *termcap) setupterm(name string) error { func LoadTerminfo(name string) (*terminfo.Terminfo, string, error) { var tc termcap if err := tc.setupterm(name); err != nil { - if err != nil { - return nil, "", err - } + return nil, "", err } t := &terminfo.Terminfo{} - // If this is an alias record, then just emit the alias t.Name = tc.name - if t.Name != name { - return t, "", nil - } t.Aliases = tc.aliases t.Colors = tc.getnum("colors") t.Columns = tc.getnum("cols")