https://gitlab.synchro.net/main/sbbs/-/commit/08dab3e8d41ca038f76d4c9a
Modified Files:
exec/xtrn_sec.js
Log Message:
xtrn_sec.js: center the program list on its content, not screen/4
The single-column program list used a fixed left margin of screen_columns/4, which only lands near center at 80 columns and drifts steadily left as the terminal widens -- at 132 columns the list sits in the left third (left gap 32, right gap 69). It is not well centered even at 80 (left 19, right 30).
Measure the widest row's DISPLAYED width instead -- strip_ctrl() drops the zero-width \x01 attribute codes -- and split the remaining slack. That balances the list to within the odd-column rounding at every width, and stays correct when a sysop customizes singlecolumn_fmt (a cost column, different separators), because it measures the rendered rows rather than assuming a layout. This is the same measure-the-content approach the section list a few blocks down already uses.
--- SBBSecho 3.37-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)