mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-01 20:32:15 +00:00
fix debug mode crash sometimes occurring when deleting korean
fixes GH-1551
This commit is contained in:
parent
549675d8d7
commit
e6ec1c7bca
2 changed files with 12 additions and 0 deletions
|
@ -452,6 +452,8 @@ public final class InputLogic {
|
|||
// to the current word instead of considering the cursor position
|
||||
// position is actually not visible to the combiner, how to fix?
|
||||
processedEvent = mWordComposer.processEvent(hangulDecodedEvent);
|
||||
if (event.getMKeyCode() == KeyCode.DELETE)
|
||||
mWordComposer.resetInvalidCursorPosition();
|
||||
} else {
|
||||
mWordComposer.setHangul(false);
|
||||
final boolean wasComposingWord = mWordComposer.isComposingWord();
|
||||
|
|
|
@ -160,6 +160,16 @@ class InputLogicTest {
|
|||
assertEquals("ㅛ.", text)
|
||||
}
|
||||
|
||||
// see issue 1551 (debug only)
|
||||
@Test fun deleteHangul() {
|
||||
reset()
|
||||
currentScript = ScriptUtils.SCRIPT_HANGUL
|
||||
setText("ㅛㅛ ")
|
||||
functionalKeyPress(KeyCode.DELETE)
|
||||
functionalKeyPress(KeyCode.DELETE)
|
||||
functionalKeyPress(KeyCode.DELETE)
|
||||
}
|
||||
|
||||
@Test fun separatorUnselectsWord() {
|
||||
reset()
|
||||
setText("hello")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue