Skip to content
Snippets Groups Projects
Commit 8651f2af authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Don't treat Enter as choosing default section when no prompt was shown

As pointed out via DOVE-Net by DesotoFireflite (VALHALLA):
When xtrn_sec.* display file/menu is used, there's no auto-generated
prompt (with a default section number indicated). So hitting Enter
in this case and having the previous/default program section selected
would be surprising behavior to a user. So, only support a default
section selection when there was no xtrn_sec.* menu/display file.
parent 5615e656
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -263,6 +263,7 @@ function external_section_menu()
if(bbs.menu_exists("xtrn_sec")) {
bbs.menu("xtrn_sec");
bbs.menu("xtrn_sec_tail", P_NOERROR);
xsec = undefined; // no default section
}
else {
if(options.sort)
......@@ -291,6 +292,8 @@ function external_section_menu()
var num = console.getnum(sec_list.length);
if(num < 0)
break;
if(xsec === undefined && num == 0) // Enter = Quit, when there's no prompt
break;
if(num > 0)
xsec = num - 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment