mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Fix #7020: end key not working in text input.
This commit is contained in:
@@ -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