Skip to content

Commit

Permalink
Fix the issue of commands not recognized when user type in extra space
Browse files Browse the repository at this point in the history
  • Loading branch information
MAOXIONGKAI committed Sep 20, 2024
1 parent 4d5fa56 commit 2237c73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/gopher/gui/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void setGopher(Gopher gopher) {
*/
@FXML
private void handleUserInput() {
String input = userInput.getText();
String input = userInput.getText().trim();
if (input.isEmpty()) {
return;
}
Expand Down

0 comments on commit 2237c73

Please sign in to comment.