From 74ba60227f0883f4abed0319b9b22d8dfc52ed2c Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Thu, 8 Dec 2022 23:25:16 -0500
Subject: [PATCH] Repair the script floater

---
 indra/llui/lltexteditor.cpp       | 5 ++++-
 indra/newview/llpreviewscript.cpp | 1 -
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 99761713e47..3290bce9389 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -2788,7 +2788,10 @@ bool LLTextEditor::loadFromFile(const std::string& filename)
 	buffer[nread] = '\0';
 	fclose(file);
 
-	setText(LLStringExplicit(buffer));
+	std::string text = std::string(buffer);
+	LLStringUtil::replaceTabsWithSpaces(text, LLTextEditor::spacesPerTab());
+
+	setText(LLStringExplicit(text));
 	delete[] buffer;
 
 	return true;
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index d07eaa540da..37d94ef3503 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -599,7 +599,6 @@ void LLScriptEdCore::makeEditorPristine()
 
 bool LLScriptEdCore::loadScriptText(const std::string& filename)
 {
-// ALCHEMYMERGE
 // [SL:KB] - Patch: Build-AssetRecovery | Checked: 2013-07-28 (Catznip-3.6)
 	return mEditor->loadFromFile(filename);
 // [/SL:KB]
-- 
GitLab