Opened 15 years ago
Closed 15 years ago
#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 (2)
Change History (5)
Changed 15 years ago by jxh@…
comment:1 follow-up: 2 Changed 15 years ago by jmroot (Joshua Root)
Just for future reference, we prefer unified diffs (diff -u
).
comment:2 Changed 15 years ago by jxh@…
Replying to jmr@…:
Just for future reference, we prefer unified diffs (
diff -u
).
Sorry about that. I'm new here. Will attach that as well.
comment:3 Changed 15 years ago by jmroot (Joshua Root)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Thanks for the report, fixed in r59839.
Suggested fix.