mojira.dev
MC-165562

Command suggestion report "incorrect argument" when cursor is at the start of a node without suggestions

When typing arguments for a node that has no suggestions, now the command suggestion will just report and error instead of showing the string representation of the command node that the user is completing.

 

Before: (tested in 19w36a) when typing /help and a space, [<command>] text floats in the suggestion area

Now: (19w46a) when typing /help and a space, an error is displayed instead.

 

Same thing can be replicated to other argument nodes without proper suggestions, like the path or scale for /data get or /function etc.

This "incorrect argument" report IMO is partially intended as 19w46b aims to show this error in command blocks (trailing spaces do break commands in command blocks); imo a best solution is to have the error and the suggestion both presented on client, and only present the error for command function parsing.

Linked issues

Attachments

Comments 14

Other examples error images:

[media]

In this case, the command cannot have a suggestion for an integer argument, and since it has no suggestion, an error is posted instead.

Also, given the purpose of this error (to prevent accidental trailing spaces in command blocks/functions), we may tweak the suggestion ui to display both suggestions and exceptions in a case like this.

I can confirm this happens in 19w46a.

can confirm still happens in 19w46b

4 more comments

Can confirm in 21w03a.

Can confirm in 21w13a.

Can confirm in 1.18.2 and 22w16b.

Can confirm in 1.19.

Can confirm in 1.19.2 and 22w42a.

liach

slicedlime

Confirmed

Normal

Commands

command, tab-completion

19w46a, 19w46b, 1.15 Pre-release 1, 1.15 Pre-Release 2, 1.15 Pre-release 3, ..., 1.19, 1.19.2, 22w42a, 1.19.4, 23w18a

1.20 Pre-release 2

Retrieved