Commit 5a8fbb6
committed
Fix COLUMNS/LINES injection to match TTY allocation logic
The TTY allocation condition checks both stdin.isTTY && stdout.isTTY,
but COLUMNS/LINES were only injected when !stdout.isTTY. This caused
missing terminal size hints when stdin is not a TTY but stdout is
(e.g., piped input). Changed the condition to match the PTY allocation
logic: inject COLUMNS/LINES when !(stdin.isTTY && stdout.isTTY).
Also updated test helper to include stdin in context and added test
coverage for the stdin-not-TTY-but-stdout-is-TTY scenario.1 parent 568fb81 commit 5a8fbb6
2 files changed
Lines changed: 12 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
128 | | - | |
129 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
130 | 138 | | |
131 | 139 | | |
132 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
0 commit comments