diff --git a/terminfo/terminfo.go b/terminfo/terminfo.go index ea8c6d7..b7fc0fa 100644 --- a/terminfo/terminfo.go +++ b/terminfo/terminfo.go @@ -756,6 +756,12 @@ func loadFromFile(fname string, term string) (*Terminfo, error) { // one from the JSON file located in either $TCELLDB, $HOME/.tcelldb // or in this package's source directory as database.json). func LookupTerminfo(name string) (*Terminfo, error) { + if name == "" { + // else on windows: index out of bounds + // on the name[0] reference below + return nil, ErrTermNotFound + } + dblock.Lock() t := terminfos[name] dblock.Unlock()