• exec/xtrn_sec.js

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Tue Jul 21 01:49:54 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/0d838a1664d3281c45314e3c
    Modified Files:
    exec/xtrn_sec.js
    Log Message:
    Fix centering (margin calculation) for widths not modulo 4

    e.g. program lists would be centered for a 116 column terminal, but not
    for a 117 column terminal.
    `

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Thu Jul 23 00:08:00 2026
    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.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Thu Jul 23 00:08:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/0986ce16e012c80d9deec348
    Modified Files:
    exec/xtrn_sec.js
    Log Message:
    xtrn_sec.js: center the section list on its content too

    Follow-up to centering the program list. The section list used
    (screen_columns - longest)/2 - 5, where longest was the longest section NAME and 5 was a guessed allowance for the "%3d: " numbering. That misjudges the real row width both ways: with the default format the list sits a few columns left of center at every width, and a customized section_fmt (wider numbering,
    a suffix) throws it off in the other direction.

    Measure the widest rendered row with strip_ctrl(), exactly as the program list now does, and split the slack -- dead center regardless of screen width or how section_fmt is themed. The separate longest-name precomputation at the top of external_section_menu() is now unused and removed.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net