From 7106e399b3343702b053547651264ff70ad3fa8f Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Mon, 6 Sep 2010 20:09:32 -0700 Subject: Fixed regression of #245 --- linden/indra/llui/lltexteditor.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'linden/indra/llui') diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index 51f7ad6..8123af2 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp @@ -1079,6 +1079,11 @@ S32 LLTextEditor::getCursorPosFromLocalCoord( S32 local_x, S32 local_y, BOOL rou void LLTextEditor::setCursor(S32 row, S32 column) { + // Make sure we're not trying to set the cursor anywhere + // it can't go by always setting the min to 0 -- MC + row = (row < 0) ? 0 : row; + column = (column < 0) ? 0 : column; + const llwchar* doc = mWText.c_str(); const char CR = 10; while(row--) -- cgit v1.1