mojira.dev
MC-309844

Accepting command suggestions overwrites manually edited command arguments

After using chat autocomplete to complete a command argument (either a numeric value or a text-based argument that supports autocomplete), if the player edits that argument by inserting, deleting, or replacing characters, using autocomplete again behaves incorrectly.

Pressing Tab or clicking the autocomplete suggestion does not simply continue completion based on the text currently visible in the input box or move the cursor to the end of the command. Instead, it overwrites part of the command, changing text that was already correct.

This happens with multiple command argument types, including:

  • Numeric coordinates (for example, the Y coordinate in /setblock).

  • Text-based arguments that support autocomplete (such as block IDs, entity IDs, and other resource locations).

Steps to Reproduce (A – Numeric Coordinate)

  1. Open chat (or the command block console) and type: /setblock

  2. Use autocomplete (by pressing Tab or clicking the suggestion) to complete the coordinates.

  3. Place the cursor in the middle of one of the completed numbers (for example, between the 8 and the 7 in 87).

  4. Edit the number so that 87 becomes 67 by deleting the 8 and typing 6.

  5. Press Tab or click the autocomplete suggestion.

Steps to Reproduce (B – Text-Based Argument)

  1. Open chat and type: /setblock ~ ~ ~ minecraft:

  2. Use autocomplete to complete the argument.

  3. Place the cursor somewhere inside the completed name and delete one character.

  4. Type the same character again so the argument is exactly the same as before.

  5. Press Tab or click the autocomplete suggestion.

Expected Result

Pressing Tab or clicking the autocomplete suggestion should not change text that is already correct. It should either continue autocomplete based on the current text under the cursor or simply move the cursor to the end of the command without changing any existing text.

Observed Result

In every case tested, pressing Tab or clicking the autocomplete suggestion overwrites part of the already-correct argument from the cursor position onward instead of keeping the existing text.

This causes part of the manually corrected argument to be replaced or lost, resulting in a command that no longer matches what was visible immediately before autocomplete was confirmed.

Attachments

Comments 1

Thank you for helping us improve Minecraft! We saved your files:

[media]

wolkito

(Unassigned)

Confirmed

Platform

Low

Commands, UI

26.3 Snapshot 3, 26.3 Snapshot 5, 26.3 Snapshot 6, 26.3 Snapshot 7, 26.3 Snapshot 8, 26.3 Snapshot 9, 26.3 Snapshot 10, 26.3 Pre-Release 1, 26.4 Snapshot 2

Retrieved