https://gitlab.synchro.net/main/sbbs/-/commit/d1e7b2a37112dee6bf8f9743
Added Files:
exec/load/select_item.js
Modified Files:
ctrl/modopts.ini docs/v322_new.md exec/load/shell_lib.js exec/uselect.js
Log Message:
select_item.js: shared numbered-list selector for uselect and area lists
New exec/load/select_item.js library: the paged, arrow-key navigated numbered-list selection loop formerly in uselect.js. After the first draw
it never clears the screen: moving the default item repaints only the old
and new item lines and the prompt, and a page change repaints the item
lines in place (falling back to a full redraw only if the terminal can't position the cursor).
uselect.js now uses it, as do the message group/sub-board and file library/directory selection functions in shell_lib.js (the J command of
the Synchronet Classic, Wildcat, Spitfire and Novice shells), which gain
paging and Up/Down, Home/End and PgUp/PgDn navigation. A sysop's custom grps/subs<N>/libs/dirs<N> menu file is still displayed in place of the
list, with number entry only.
Customizing the default-item marker and highlight in ctrl/modopts.ini:
[shell]
default_item_prefix: "\x01U->" ; marks the default area (else '*')
nondefault_item_prefix: " " ; same width, for the other areas
default_item_attr: "\x01V" ; highlight the default area's name
; or "\x01n\x017\x01k" for a reverse-video (black on gray) bar
; more_fmt: format of the "[x-y of n]" indicator
[uselect]
default_item_fmt: "\x01U->\x01v%*s(\x01V%d\x01v) \x01V%s \x01U<-"
nondefault_item_fmt: "\x01U \x01v%*s(\x01V%d\x01v) \x01U%s"
; reverse-video bar: replace "\x01V%s" with "\x01n\x017\x01k%s\x01n"
The highlight is padded to the longest name in the list, so it forms an
even bar. A prefix wider than one column narrows the 60-column area
description field to match, so a line never reaches column 80 and wraps;
both apply only to text.dat area list formats with the stock %-60.60s description field. The "[x-y of n]" indicator is indented to align with
the item numbers after the marker.
Without these options the lists look as they did in v3.21 ('*' marker),
so an upgraded system's existing modopts.ini is unaffected; the stock ctrl/modopts.ini now sets the arrow marker and highlighted name.
Co-Authored-By: Claude Opus 5.5 <
noreply@anthropic.com>
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net