Commit ad32b08
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)
(cherry picked from commit 72e2c45)1 parent 644f40e commit ad32b08
File tree
4 files changed
+16
-14
lines changed- base
- deps/checksums/StyledStrings-3fe829fcf611b5fefaefb64df7e61f2ae82db117.tar.gz
4 files changed
+16
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | 270 | | |
275 | 271 | | |
276 | 272 | | |
| |||
| 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: 0 additions & 1 deletion
This file was deleted.
Lines changed: 0 additions & 1 deletion
This file was deleted.
0 commit comments