Merge pull request #13021 from Nightfirecat/chatbox-text-input-left-right-improvement
ChatboxTextInput: Improve open selection left/right handling
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user