Commit 72e2c45
authored
Make current_terminfo a OncePerProcess (#58854)
There seems to be no reason to always load this unconditionally -
especially since it's in the critical startup path. If we never print
colored output or our IO is not a TTY, we don't need to load this at
all. While we're at it, remove the `term_type` argument to
`ttyhascolor`, which didn't work as advertised anyway, since it still
looked at the current_terminfo. If clients want to do a full TermInfo
check, they can do that explicitly.
(Written by Claude Code)1 parent 41613c2 commit 72e2c45
File tree
7 files changed
+19
-15
lines changed- base
- deps/checksums
- StyledStrings-1aafc2f3abb6a977ee36a87206f9ce6446a8ae86.tar.gz
- StyledStrings-3fe829fcf611b5fefaefb64df7e61f2ae82db117.tar.gz
- stdlib
7 files changed
+19
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | 273 | | |
278 | 274 | | |
279 | 275 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
307 | 316 | | |
308 | 317 | | |
309 | 318 | | |
310 | 319 | | |
311 | | - | |
| 320 | + | |
312 | 321 | | |
313 | | - | |
314 | | - | |
315 | | - | |
| 322 | + | |
| 323 | + | |
316 | 324 | | |
317 | 325 | | |
318 | 326 | | |
| |||
352 | 360 | | |
353 | 361 | | |
354 | 362 | | |
355 | | - | |
356 | | - | |
357 | | - | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
358 | 366 | | |
359 | 367 | | |
360 | 368 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 0 additions & 1 deletion
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
0 commit comments