fixes for repl-port

ober

3ede03da927e601a6d489fdc6713f09edc9af8cd

diff --git a/src/jcode/ui/tui.ss b/src/jcode/ui/tui.ss
index 14ae8a0..110fb5e 100644
--- a/src/jcode/ui/tui.ss
+++ b/src/jcode/ui/tui.ss
@@ -191,9 +191,10 @@
   ;; NOTE: cli-main already called load-config, session-init-db, init-tools
   ;; before dispatching here — do NOT re-init.
   (apply-tui-overrides! args)
-  ;; Start debug REPL (auto-port) — connect with: rlwrap nc 127.0.0.1 $(cat ~/.jcode-repl-port)
-  (try (start-jcode-repl!)
-    (catch (e) (void)))
+  ;; Skip if --repl-port already started a REPL — otherwise we stomp the user's port.
+  (unless (jcode-repl-port)
+    (try (start-jcode-repl!)
+      (catch (e) (void))))
   (let ((verbose? (and (member "--verbose" args) #t)))
     (when verbose? (open-tui-log!))
     (tui-log "tui-main: starting, args=~a" args)