summaryrefslogtreecommitdiff
path: root/indra/newview/llpreviewscript.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpreviewscript.cpp')
-rw-r--r--indra/newview/llpreviewscript.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index b3e53df6d8..01167a43b8 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -751,6 +751,8 @@ void LLScriptEdCore::draw()
S32 line = 0;
S32 column = 0;
mEditor->getCurrentLineAndColumn( &line, &column, false ); // don't include wordwrap
+ line = mEditor->getIsLuauLanguage() ? (line + 1) : line;
+ column = mEditor->getIsLuauLanguage() ? (column + 1) : column;
LLStringUtil::format_map_t args;
std::string cursor_pos;
args["[LINE]"] = llformat ("%d", line);
@@ -1211,6 +1213,7 @@ void LLScriptEdCore::onErrorList(LLUICtrl*, void* user_data)
sscanf(line.c_str(), "%d %d", &row, &column);
//LL_INFOS() << "LLScriptEdCore::onErrorList() - " << row << ", "
//<< column << LL_ENDL;
+ row = (self->mEditor->getIsLuauLanguage() ? row - 1 : row);
self->mEditor->setCursor(row, column);
self->mEditor->setFocus(true);
}