mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-21 14:50:44 +01:00
[escher/text_area] Fix cursor navigation on combining code points
This commit is contained in:
committed by
EmilieNumworks
parent
1043426c40
commit
67eea0802f
@@ -104,15 +104,13 @@ bool TextArea::handleEvent(Ion::Events::Event event) {
|
||||
return false;
|
||||
}
|
||||
UTF8Decoder decoder(text(), cursorLocation());
|
||||
decoder.previousCodePoint();
|
||||
return setCursorLocation(decoder.stringPosition());
|
||||
return setCursorLocation(decoder.previousGlyphPosition());
|
||||
} else if (event == Ion::Events::Right) {
|
||||
if (UTF8Helper::CodePointIs(cursorLocation(), UCodePointNull)) {
|
||||
return false;
|
||||
}
|
||||
UTF8Decoder decoder(cursorLocation());
|
||||
decoder.nextCodePoint();
|
||||
return setCursorLocation(decoder.stringPosition());
|
||||
return setCursorLocation(decoder.nextGlyphPosition());
|
||||
} else if (event == Ion::Events::Up) {
|
||||
contentView()->moveCursorGeo(0, -1);
|
||||
} else if (event == Ion::Events::Down) {
|
||||
|
||||
Reference in New Issue
Block a user