From 648f020d426dfd7bde139231b852399b477142c2 Mon Sep 17 00:00:00 2001
From: "Rob Swindell (on Windows 11)" <rob@synchro.net>
Date: Sat, 30 Dec 2023 17:43:21 -0800
Subject: [PATCH] Don't clear the console-abort flag upon return from executing
 a JS module

This completes the revert of commit c22063f9 from (Jun-2-2016). The Baja
part of that commit was reverted in commit 932fae30 (Nov-15-2016). This
behavior has proven to be surprising and annoying for JS mod developers
(e.g. the yesnobar.js and Nightfox's file searcher/scanner).

If we still need clearing of abort status after running JS "externals",
that should probably be done in exec_xtrn(), not here.
---
 src/sbbs3/exec.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sbbs3/exec.cpp b/src/sbbs3/exec.cpp
index 62a9df37b4..454d7031a4 100644
--- a/src/sbbs3/exec.cpp
+++ b/src/sbbs3/exec.cpp
@@ -674,7 +674,7 @@ int sbbs_t::js_execfile(const char *cmd, const char* startup_dir, JSObject* scop
 	js_callback.listeners = NULL;
 	JS_ExecuteScript(js_cx, js_scope, js_script, &rval);
 	js_handle_events(js_cx, &js_callback, &terminated);
-	sys_status &=~ SS_ABORT;
+//	sys_status &=~ SS_ABORT;
 
 	JS_GetProperty(js_cx, js_scope, "exit_code", &rval);
 	if(rval!=JSVAL_VOID)
-- 
GitLab