Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1236,6 +1236,9 @@ private void handleBackspaceEvent(final Event event, final InputTransaction inpu
}
if (mWordComposer.isComposingWord()) {
if (mWordComposer.isBatchMode()) {
if (SpaceState.PHANTOM == inputTransaction.getSpaceState()) {
return;
}
final String rejectedSuggestion = mWordComposer.getTypedWord();
mWordComposer.reset();
mWordComposer.setRejectedBatchModeSuggestion(rejectedSuggestion);
Expand Down Expand Up @@ -1305,6 +1308,9 @@ private void handleBackspaceEvent(final Event event, final InputTransaction inpu
// Likewise
return;
}
} else if (SpaceState.PHANTOM == inputTransaction.getSpaceState()) {
restartSuggestionsOnWordTouchedByCursor(inputTransaction.getSettingsValues(), currentKeyboardScript);
return;
}

boolean hasUnlearnedWordBeingDeleted = false;
Expand Down
3 changes: 2 additions & 1 deletion app/src/test/java/helium314/keyboard/latin/InputLogicTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,8 @@ class InputLogicTest {
reset()
glideTypingInput("hello")
assertEquals("hello", text)
functionalKeyPress(KeyCode.DELETE)
functionalKeyPress(KeyCode.DELETE) // delete phantom space
functionalKeyPress(KeyCode.DELETE) // delete word
assertEquals("", text)

// todo: now we want some way to disable delete-all on backspace, either per setting or something else
Expand Down
Loading