From 4df2ae8f16a74cb136787507b12b645e4fe2cb45 Mon Sep 17 00:00:00 2001
From: "Rob Swindell (on Windows 11)" <rob@synchro.net>
Date: Sat, 25 May 2024 12:02:32 -0700
Subject: [PATCH] Move the line_delay logic so it has effect on PETSCII
 terminals too

Fix issue #759
---
 src/sbbs3/con_out.cpp | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/sbbs3/con_out.cpp b/src/sbbs3/con_out.cpp
index c72c622c37..9410d62215 100644
--- a/src/sbbs3/con_out.cpp
+++ b/src/sbbs3/con_out.cpp
@@ -727,6 +727,8 @@ int sbbs_t::outchar(char ch)
 			outcom(TELNET_IAC);	/* Must escape Telnet IAC char (255) */
 		if(ch == '\r' && (console&CON_CR_CLREOL))
 			cleartoeol();
+		if(ch == '\n' && line_delay)
+			SLEEP(line_delay);
 		if(term&PETSCII) {
 			uchar pet = cp437_to_petscii(ch);
 			if(pet == PETSCII_SOLID)
@@ -739,11 +741,8 @@ int sbbs_t::outchar(char ch)
 		} else {
 			if(utf8[0] != 0)
 				putcom(utf8);
-			else {
-				if(ch == '\n' && line_delay)
-					SLEEP(line_delay);
+			else
 				outcom(ch);
-			}
 		}
 	}
 	if(outchar_esc == ansiState_none) {
-- 
GitLab