mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Corrected a small bug in TextEditor when clicking to the right of the last line to place the cursor.
This commit is contained in:
parent
38a4baa9dd
commit
1884e0142a
1 changed files with 3 additions and 3 deletions
|
|
@ -2400,12 +2400,12 @@ int TextEditor::indexAtPosition (const float x, const float y)
|
|||
{
|
||||
for (Iterator i (*this); i.next();)
|
||||
{
|
||||
if (i.lineY + i.lineHeight > y)
|
||||
if (y < i.lineY + i.lineHeight)
|
||||
{
|
||||
if (i.lineY > y)
|
||||
if (y < i.lineY)
|
||||
return jmax (0, i.indexInText - 1);
|
||||
|
||||
if (i.atomX >= x)
|
||||
if (x <= i.atomX || i.atom->isNewLine())
|
||||
return i.indexInText;
|
||||
|
||||
if (x < i.atomRight)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue