mojira.dev
MC-134843

Intermediate command arguments do not display parse error messages unless the cursor is at the end of the command

The bug

When an invalid value is entered for an argument in the middle of a command string, the command is shown in red to indicate it is invalid, but the specific parse error message is not displayed unless the text cursor is placed at the end of the command.

Steps to recreate

I used the /effect command since it has a lot of arguments.

  1. Enter a basic command with an invalid parameter at the end.
    Example: /effect give @e[type=pig] levitation -1

    [media]
  2. Notice the parse error message:
    Integer must not be less than 1, found -1 at position ...

  3. Enter the same command with correct arguments.
    Example: /effect give @e[type=pig] levitation 100 255 true

  4. Go back and change an argument to be invalid.
    Example: /effect give @e[type=pig] levitation -1 255 true

    [media]
  5. Notice the command turns red to indicate error, but no message is displayed like before.

  6. Now press <End> to move the cursor to the end of the command.

  7. Notice the error message again displays as expected.

    [media]

Linked issues

Attachments

Comments 1

Can confirm in 20w51a.

Tedstar (Curtis Anderson)

(Unassigned)

Confirmed

(Unassigned)

argument, brigadier, command, command-syntax-help, commands, cursor, error-message, input, parsing, syntax, tab-completion

Minecraft 18w30a, Minecraft 18w30b, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 18w43b, ..., Minecraft 19w07a, Minecraft 19w08b, 1.15.1, 20w51a, 24w38a

Retrieved