From b465a62d79b772e056685a32a4b08ecf53f9e0b0 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Sat, 2 Jan 2016 22:06:42 +0000 Subject: [PATCH] The program listing will now terminate (before the end of the list) if/when the console-abort flag is set. This is/was the behavior of the built-in xtrn_sec function and failed to make it into this script. This allows a long, multipage, program listing to be aborted with 'N' or 'Q' or Ctrl-C. Thanks to Nightfox for reporting this difference in behavior even though he was actually wanting the console-abort flag to be ignored for a separate reason. :-) --- exec/xtrn_sec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exec/xtrn_sec.js b/exec/xtrn_sec.js index b27f658ead..ed412309f5 100644 --- a/exec/xtrn_sec.js +++ b/exec/xtrn_sec.js @@ -26,7 +26,7 @@ var xsec=-1; } var options; -if((options=load("modopts.js","xtrn_sec")) == null) +if((options=load({}, "modopts.js","xtrn_sec")) == null) options = {multicolumn: true, sort: false}; // default values if(options.multicolumn == undefined) @@ -83,7 +83,7 @@ function external_program_menu(xsec) else n=prog_list.length; - for(i=0;i<n;i++) { + for(i=0;i<n && !console.aborted;i++) { printf(bbs.text(XtrnProgLstFmt),i+1 ,prog_list[i].name ,prog_list[i].cost); -- GitLab