From 58ceaacafd67d69deeeac8905ed46c2920eb2c4d Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 13 May 2022 19:31:47 +0300 Subject: SL-16698 Replace tabs with spaces in Scripts --- indra/newview/llpreviewscript.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index a32dc8beda..d677a996c1 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -601,7 +601,10 @@ bool LLScriptEdCore::loadScriptText(const std::string& filename) buffer[nread] = '\0'; fclose(file); - mEditor->setText(LLStringExplicit(buffer)); + std::string text = std::string(buffer); + LLStringUtil::replaceTabsWithSpaces(text, LLTextEditor::spacesPerTab()); + + mEditor->setText(text); delete[] buffer; return true; -- cgit v1.2.3