mirror of https://github.com/gdamore/tcell.git
Fix small lint & spelling issues
This commit is contained in:
parent
6b28764250
commit
44772c121b
|
@ -46,7 +46,7 @@ var encodingFallback EncodingFallback = EncodingFallbackFail
|
|||
// Aliases can be registered as well, for example "8859-15" could be an alias
|
||||
// for "ISO8859-15".
|
||||
//
|
||||
// For POSIX systems, the tcell pacakge will check the environment variables
|
||||
// For POSIX systems, the tcell package will check the environment variables
|
||||
// LC_ALL, LC_CTYPE, and LANG (in that order) to determine the character set.
|
||||
// These are expected to have the following pattern:
|
||||
//
|
||||
|
|
|
@ -93,8 +93,8 @@ func setupterm(name string) error {
|
|||
}
|
||||
plist = append(plist, "")
|
||||
rsn := C.int(0)
|
||||
|
||||
for _, p := range(plist) {
|
||||
|
||||
for _, p := range plist {
|
||||
// Override environment
|
||||
if p == "" {
|
||||
os.Unsetenv("TERMINFO")
|
||||
|
@ -145,7 +145,7 @@ func getinfo(name string) (*tcell.Terminfo, error) {
|
|||
if strings.HasSuffix(name, "-truecolor") {
|
||||
base := name[:len(name)-len("-truecolor")]
|
||||
// Probably -256color is closest to what we want
|
||||
if err = setupterm(base+"-256color"); err != nil {
|
||||
if err = setupterm(base + "-256color"); err != nil {
|
||||
err = setupterm(base)
|
||||
}
|
||||
if err == nil {
|
||||
|
@ -638,7 +638,7 @@ func main() {
|
|||
}
|
||||
} else {
|
||||
tdata[t.Name] = t
|
||||
if t2, e := getinfo(term+"-256color"); e == nil {
|
||||
if t2, e := getinfo(term + "-256color"); e == nil {
|
||||
tdata[t2.Name] = t2
|
||||
}
|
||||
}
|
||||
|
|
|
@ -133,7 +133,7 @@ type Screen interface {
|
|||
Sync()
|
||||
|
||||
// CharacterSet returns information about the character set.
|
||||
// This isn't the full locale, but it does give us the input/ouput
|
||||
// This isn't the full locale, but it does give us the input/output
|
||||
// character set. Note that this is just for diagnostic purposes,
|
||||
// we normally translate input/output to/from UTF-8, regardless of
|
||||
// what the user's environment is.
|
||||
|
|
|
@ -417,7 +417,7 @@ outer:
|
|||
continue
|
||||
}
|
||||
|
||||
return failed == false
|
||||
return !failed
|
||||
}
|
||||
|
||||
func (s *simscreen) Sync() {
|
||||
|
|
|
@ -725,7 +725,7 @@ func loadFromFile(fname string, term string) (*Terminfo, error) {
|
|||
}
|
||||
}
|
||||
|
||||
// LookupTerminfo attemps to find a definition for the named $TERM.
|
||||
// LookupTerminfo attempts to find a definition for the named $TERM.
|
||||
// It first looks in the builtin database, which should cover just about
|
||||
// everyone. If it can't find one there, then it will attempt to read
|
||||
// one from the JSON file located in either $TCELLDB, $HOME/.tcelldb
|
||||
|
|
Loading…
Reference in New Issue