https://gitlab.synchro.net/main/sbbs/-/commit/77686747c912589b496636bf
Modified Files:
ctrl/modopts.ini docs/v322_new.md exec/load/select_item.js exec/xtrn_sec.js
Log Message:
xtrn_sec.js: arrow-key navigation, highlight and paging via select_item.js
The external program section and program lists are now displayed and
answered through select_item() (issue #1346), as the text file section
lists are:
- Lists that don't fit on the screen are paged, with an [x-y of n]
indicator, rather than scrolled off the top.
- New modopts.ini [xtrn_sec] options default_item_prefix,
nondefault_item_prefix, default_item_attr and more_fmt mark and
highlight a default item that the arrow, Home/End and PgUp/PgDn keys
move and Enter chooses. In a program list, the default item is the
program last run. Without these options the lists look as they did,
Enter does what it did and the navigation keys only page.
- The marker is left out of a two-column list that would be wider than
the screen with it (the stock format at 80 columns); the highlighted
name marks the default item there.
- The name is highlighted only when the item format displays it with a
plain %s or a fixed-width field (e.g. %-32.32s).
- With clear_screen disabled, a list is displayed as before, without
paging or navigation.
- The multicolumn, center, sort and align options, the head and tail
menu files and the menu files displayed in place of a list (answered
by number only) are unchanged.
select_item.js gained what this needed:
- columns and column_separator options: the items are listed down each
column in turn and the left and right arrow keys move between the
columns. A list longer than a page of columns is displayed in whole
pages, redrawn on a page change.
- header may be a function, and a new footer function displays what
goes between the list and the prompt. A footer that pushes the prompt
off the screen is measured and the list redisplayed in the rows left.
- no_clear option: display the list without clearing the screen, not
paged and without the navigation keys.
The stock modopts.ini enables the marker and highlight.
Co-Authored-By: Claude Fable 5.2 <
noreply@anthropic.com>
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net