Skip to content

[C] Missing completions when identifier prefixed by minus (version 4200) #4422

@wronex

Description

@wronex

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.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: Completionshttps://www.sublimetext.com/docs/completions.htmlT: core-bugA bug being caused by ST, which can't be addressed by a change in this repository

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions