AmendHub

Download:

jcs

/

subtext

/

amendments

/

415

settings: Paginate long lists in struct_editor


jcs made amendment 415 about 1 year ago
--- settings.c Fri Mar 10 20:11:33 2023 +++ settings.c Tue Mar 14 11:36:18 2023 @@ -90,6 +90,17 @@ struct_editor(struct session *s, const struct struct_f while (!done && !s->ending) { if (show_list) { for (n = 0; n < nfields; n++) { + if ((n + 1) % (s->terminal_lines - 2) == 0) { + session_printf(s, "-- More --"); + session_flush(s); + session_input_char(s); + if (s->vt100) + session_printf(s, "\r%s", + ansi(s, ANSI_ERASE_LINE, ANSI_END)); + else + session_output(s, "\r", 1); + } + sf = &fields[n]; session_printf(s, "{{B}}%d{{/B}}: %s [", n + 1, sf->name);