Skip to content

Suggestions fail to show up in switch statement when accessing enum member #14605

Description

@mehlian

Environment

  • OS and Version: Windows 10
  • VS Code Version: 1.108.2
  • C/C++ Extension Version: 1.32.2
  • If using SSH remote, specify OS of remote machine: none

Bug Summary and Steps to Reproduce

Bug Summary:
Suggestions popup fails to show up when editor cursor is between ::: chars.

Steps to reproduce:

  1. Paste code (file.hpp):
enum class MyEnum
{
    None,
    One,
};

void func(MyEnum myEnum)
{
    switch (myEnum)
    {
    case MyEnum:::                       // <- problem here
        break;
    
    default:
        break;
    }
}
  1. Move editor's cursor between 3 colon chars (like this: ::|: ) and press CTRL+SPACE to trigger suggestions popup.
  2. No suggestions info shows up
  3. Make space between 3 colon chars (like this :: : ) and try again to press CTRL+SPACE when cursor is after 2 colon chars and space - suggestions show up

Expected behavior:
Suggestions popup show up after pressing CTRL+SPACE when editor's cursor is after 2 colon chars regardless of what char comes after.

Configuration and Logs

none

Other Extensions

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions