Apply .trim() before .isEmpty() check to prevent 0-length splits
This commit is contained in:
parent
dd811bd157
commit
ffa17b001b
1 changed files with 1 additions and 1 deletions
|
|
@ -43,7 +43,7 @@ final class AsyncCommandSuggestionsListener<C> implements Listener {
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
void onTabCompletion(final @NonNull AsyncTabCompleteEvent event) {
|
void onTabCompletion(final @NonNull AsyncTabCompleteEvent event) {
|
||||||
if (event.getBuffer().isEmpty()) {
|
if (event.getBuffer().trim().isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue