Ticket #22142 (closed defect: fixed)
"port variants" line-wrapping breaks if terminal columns 0
| Reported by: | jxh@… | Owned by: | macports-tickets@… |
|---|---|---|---|
| Priority: | Low | Milestone: | |
| Component: | base | Version: | 1.8.1 |
| Keywords: | columns wrap variants xterm stty | Cc: | |
| Port: |
Description
My xterms always start out with:
$ stty -a speed 38400 baud; 0 rows; 0 columns;
and this makes "ports variants dbus" (for instance) wrap its text as though one had actually set COLUMNS=0 in the environment:
$ /opt/local/bin/port variants dbus
dbus has the variants:
no_root: Run
the
DBUS
daemon
as
MacPorts
install
user.
[...]
There is some code that reads this through Pextlib and term_get_size, but it arguably shouldn't take a 0 result as quite real. If it leaves env(COLUMNS) alone, wraplabel, called from action_variants, will do the right thing.
The attached diff shows a suggested fix.
This is Snow Leopard, Mac OS 10.6.
Attachments
Change History
comment:1 follow-up: ↓ 2 Changed 4 years ago by jmr@…
Just for future reference, we prefer unified diffs (diff -u).
Note: See
TracTickets for help on using
tickets.


Suggested fix.