sublimehq / sublime_text

Issue tracker for Sublime Text
https://www.sublimetext.com
807 stars 39 forks source link

Autocomplete missing some indexed functions #5041

Open frithrah opened 2 years ago

frithrah commented 2 years ago

Description of the bug

Some functions are not shown in autocomplete even though they appear to have been indexed correctly.

Steps to reproduce

This example uses a minimal header and source file from the PCG project. Grab pcg_basic.h and pcg_basic.c.

  1. Start in safe mode passing an empty directory
  2. Copy pcg_basic.h and pcg_basic.c into the empty directory
  3. Note Indexing Status cataloguing the new files
     indexing [job 1]: indexed 2 files
     index "PCG" collated in 0.00s from 2 files
     index "PCG" is using 4096 bytes for 16 symbols across 22 locations
  4. Create new file: main.c
  5. Insert basic main function
  6. Within function, type: pcg
  7. Autocomplete only suggests pcg32_random_r and pcg32_srandom_r

Expected behavior

Autocomplete also suggests pcg32_srandom, pcg32_random, pcg32_boundedrand and pcg32_boundedrand_r

Actual behavior

Autocomplete only suggests two of the functions: pcg32_random_r and pcg32_srandom_r

Sublime Text build number

4122

Operating system & version

openSUSE Tumbleweed

(Linux) Desktop environment and/or window manager

Xfce

Additional information

No response

OpenGL context information

No response

michaelblyons commented 2 years ago

Does this belong on sublimehq/Packages instead? Also, try https://github.com/sublimehq/Packages/pull/1831 to see if that fixes your problem.

deathaxe commented 2 years ago

Even though the description slightly differs, that's basically the same issue as #5031, IMHO. ST's index based auto-completion doesn't work as users would normally expect which makes it feel broken. It's not related with syntaxes or symbols, so not directly related to Packages repo. The mensioned completions are functions, which are indexed by default. The issue is just ST not providing them under most circumstances. I don't know why some are displayed and others not though. I don't find the current behavior useful, too.

frithrah commented 2 years ago

Also, try sublimehq/Packages#1831 to see if that fixes your problem.

Alas, no difference in this situation.