Packages
Packages copied to clipboard
[C] Missing completions when identifier prefixed by minus (version 4200)
Expected behavior
When writing C code such as foo(-BAR) (note the minus sign!) I would expect that BAR is given as a completion suggestion. It is not. It works as expected for foo(+BAR). The minus sign is probably interpreted as part of the name instead of as a separate operator even though syntax highlighting is correct.
Actual behavior
Writing foo(- then pressing Ctrl+Space results in "No available completions".
Steps to reproduce
Use the following code snippet:
#define BAR 0
int foo(int x)
int main()
{
foo(-);
}
Set Syntax to C.
Place cursor after the minus sign. Invoke auto complete. No completions are found.