fixed a rare NullPointerException when changing the text case right when the suggestion list becomes empty
This commit is contained in:
parent
78b78923cf
commit
a5a34693fc
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue