Skip to content

Commit

Permalink
screen sessions should always support ANSI256
Browse files Browse the repository at this point in the history
  • Loading branch information
muesli committed Feb 5, 2022
1 parent 6964eb8 commit ce3deab
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions termenv_unix.go
Expand Up @@ -35,10 +35,13 @@ func colorProfile() Profile {
case "24bit":
fallthrough
case "truecolor":
if term == "screen" || !strings.HasPrefix(term, "screen") {
// enable TrueColor in tmux, but not for old-school screen
return TrueColor
if strings.HasPrefix(term, "screen") {
// tmux supports TrueColor, screen only ANSI256
if os.Getenv("TERM_PROGRAM") != "tmux" {
return ANSI256
}
}
return TrueColor
case "yes":
fallthrough
case "true":
Expand Down

0 comments on commit ce3deab

Please sign in to comment.