Fix #7020: end key not working in text input.

This commit is contained in:
Aaron van Geffen committed 2018-02-24 10:47:52 +01:00
1 parent dcde4f1edc
commit 88cfd14ce5
1 file changed
+9 -1
+9 -1
View File
@@ -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()