diff --git a/src/launch/java/baritone/launch/mixins/MixinGuiChat.java b/src/launch/java/baritone/launch/mixins/MixinGuiChat.java index 1c4b6d90..8d4c867e 100644 --- a/src/launch/java/baritone/launch/mixins/MixinGuiChat.java +++ b/src/launch/java/baritone/launch/mixins/MixinGuiChat.java @@ -79,7 +79,9 @@ public class MixinGuiChat { if (event.completions.length == 0) { this.pendingSuggestions = Suggestions.empty(); } else { - int offset = this.inputField.getText().endsWith(" ") ? this.inputField.getCursorPosition() : 0; + int offset = this.inputField.getText().endsWith(" ") + ? this.inputField.getCursorPosition() + : this.inputField.getText().lastIndexOf(" ") + 1; // If there is no space this is still 0 haha yes List suggestionList = Stream.of(event.completions) .map(s -> new Suggestion(StringRange.between(offset, offset + s.length()), s))