Skip to content

Commit 14afd43

Browse files
committed
Fix detection of iTerm
1 parent c57bf45 commit 14afd43

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/textual/_xterm_parser.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@
4343
)
4444

4545

46-
IS_ITERM = os.environ.get("TERM_PROGRAM", "") == "iTerm.app"
46+
IS_ITERM = (
47+
os.environ.get("LC_TERMINAL", "") == "iTerm2"
48+
or os.environ.get("TERM_PROGRAM", "") == "iTerm.app"
49+
)
4750

4851

4952
class XTermParser(Parser[Message]):

0 commit comments

Comments
 (0)