forked from rosebudai/OpenRCT2-Web
Fix #7020: end key not working in text input.
This commit is contained in:
1 parent
dcde4f1edc
commit
88cfd14ce5
1 file changed
+9
-1
@@ -194,7 +194,15 @@ void TextComposition::CursorHome()
|
||||
|
||||
void TextComposition::CursorEnd()
|
||||
{
|
||||
_session.SelectionStart = _session.SelectionSize;
|
||||
size_t selectionOffset = _session.Size;
|
||||
const utf8 * ch = _session.Buffer + _session.SelectionStart;
|
||||
while (!utf8_is_codepoint_start(ch) && selectionOffset > 0)
|
||||
{
|
||||
ch--;
|
||||
selectionOffset--;
|
||||
}
|
||||
|
||||
_session.SelectionStart = selectionOffset;
|
||||
}
|
||||
|
||||
void TextComposition::CursorLeft()
|
||||
|
||||
Reference in new issue
Block a user