1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Fixed a TextEditor border size issue.

This commit is contained in:
jules 2015-02-02 09:59:09 +00:00
parent 23cf12f449
commit e1fed0c2dc

View file

@ -1504,8 +1504,8 @@ void TextEditor::moveCaretTo (const int newPosition, const bool isSelecting)
int TextEditor::getTextIndexAt (const int x, const int y)
{
return indexAtPosition ((float) (x + viewport->getViewPositionX() - leftIndent),
(float) (y + viewport->getViewPositionY() - topIndent));
return indexAtPosition ((float) (x + viewport->getViewPositionX() - leftIndent - borderSize.getLeft()),
(float) (y + viewport->getViewPositionY() - topIndent - borderSize.getTop()));
}
void TextEditor::insertTextAtCaret (const String& t)