diff --git a/app/src/main/java/io/github/sspanak/tt9/ime/CommandHandler.java b/app/src/main/java/io/github/sspanak/tt9/ime/CommandHandler.java index 987f008c..c7ed1bd9 100644 --- a/app/src/main/java/io/github/sspanak/tt9/ime/CommandHandler.java +++ b/app/src/main/java/io/github/sspanak/tt9/ime/CommandHandler.java @@ -218,8 +218,8 @@ abstract public class CommandHandler extends TextEditingHandler { } // if there are no suggestions or they are special chars, we don't need to adjust their text case - final String before = suggestionOps.getCurrent(); - boolean beforeStartsWithLetter = !before.isEmpty() && Character.isAlphabetic(before.charAt(0)); + final String before = suggestionOps.isEmpty() || mInputMode.getSequence().isEmpty() ? "" : suggestionOps.getCurrent(); + final boolean beforeStartsWithLetter = !before.isEmpty() && Character.isAlphabetic(before.charAt(0)); if (!beforeStartsWithLetter) { settings.saveTextCase(mInputMode.getTextCase()); return true;