Merge pull request #13021 from Nightfirecat/chatbox-text-input-left-right-improvement

ChatboxTextInput: Improve open selection left/right handling
This commit is contained in:
Abex
2021-01-11 20:37:42 -07:00
committed by GitHub

View File

@@ -753,11 +753,25 @@ public class ChatboxTextInput extends ChatboxInput implements KeyListener, Mouse
return;
case KeyEvent.VK_LEFT:
ev.consume();
newPos--;
if (cursorStart != cursorEnd)
{
newPos = cursorStart;
}
else
{
newPos--;
}
break;
case KeyEvent.VK_RIGHT:
ev.consume();
newPos++;
if (cursorStart != cursorEnd)
{
newPos = cursorEnd;
}
else
{
newPos++;
}
break;
case KeyEvent.VK_UP:
ev.consume();