The bug
Non-inverted value tab-suggestions in entity selectors display the gray text in the chat input line as usual, but with the prefixed "!" it doesn't work.
How to reproduce
Type
/clear @e[gamemode=a
Use the arrow keys to cycle through the two suggestions and observe the gray text appear and disappear
Part of this bug fix should be a change to how inversion (and by extension tags etc.) is handled by the suggestion engine.
Currently, every possible inversion is listed in the suggestion list. Instead, aside from the list of suggestions, a single suggestion at the top,
!
(or in the case of tags, {{#}}) should be included. Then, after (if) the!
}} (or#
) is entered, the suggestion list should again appear, rather than the current behavior which attempts to parse the!
as the entire value, and generates an error which suppresses the list of suggestions.