jcs
/subtext
/amendments
/517
settings: Allow "q" at "more" prompt to abort pagination
jcs made amendment 517 about 1 year ago
--- settings.c Thu Mar 23 17:43:15 2023
+++ settings.c Fri Jun 16 09:33:35 2023
@@ -93,12 +93,18 @@ struct_editor(struct session *s, const struct struct_f
if ((n + 1) % (s->terminal_lines - 2) == 0) {
session_printf(s, "-- More --");
session_flush(s);
- session_input_char(s);
+ sval = 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);
+
+ if (sval == 'q' || sval == 'Q') {
+ /* abort pagination, like less */
+ show_list = false;
+ break;
+ }
}
sf = &fields[n];