randomphrase / company-c-headers

Auto-completion for C/C++ headers using Company
GNU General Public License v2.0
76 stars 9 forks source link

Ensure valid delimiter. #25

Closed jcs090218 closed 2 years ago

jcs090218 commented 3 years ago

I am getting candidates with invalid delimiter. Ensure when certain delimiter.

coveralls commented 3 years ago

Coverage Status

Coverage increased (+0.5%) to 72.414% when pulling e4dc2c35805547109c8399766c008baa8d02d50f on jcs-PR:valid-delim into 5e676ab0c2f287c868b1e3931afd4c78895910cd on randomphrase:master.

randomphrase commented 3 years ago

Thanks but this should already be handled correctly - as you can see from the existing tests. Perhaps you can create/change the tests to exhibit the breakage you are seeing?

jcs090218 commented 3 years ago

Hi, I have created a package called company-fuzzy. I am trying to call to get a list of possible candidates by company-fuzzy--call-backend, this is almost the same as (company-c-headers 'candidates "<"). The issue is that I am getting candidates with incorrect prefix/delimiter infront, and the delimiter is the first character that I have pass in for prefix due to L100. For instance, if I have passed in stdi for prefix then I am getting a list of candidates with character s infront! All candidates became something like stdint.h => sstdint.h, iostream => siostream, etc.

To keep something simple is this PR I am proposing, yet if you have a better idea; please let me know! Thanks!

jcs090218 commented 3 years ago

@randomphrase Any progress on this? Thanks!

The issue is described like the following screenshot.

Image 4

randomphrase commented 3 years ago

Hi, sorry I've been distracted due to personal issues, will try to look at this soon.

jcs090218 commented 3 years ago

Any update on this?

randomphrase commented 2 years ago

Hey @jcs090218 are you still interested in merging this? Sorry for the extended delay in responding.

randomphrase commented 2 years ago

I guess the main question I have is, why is this change necessary? The delimiters should be correctly matched by the include regex at L75 Sorry if I've missed something. FWIW, I don't really use this package myself any more.