randomphrase / company-c-headers

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

potential duplicates in headers proposition. #21

Closed fredericfrances closed 5 years ago

fredericfrances commented 6 years ago

hi,

when using a function to determine include path, company-c-headers may propose same path several times. it can also be easyly reproduced by setting some duplicate path in `company-c-headers-path-user'

here is a patch proposal to remove this duplicates. `diff --git a/company-c-headers.el b/company-c-headers.el index d217b05..41a83ac 100644 --- a/company-c-headers.el +++ b/company-c-headers.el @@ -41,6 +41,7 @@

(require 'company) (require 'rx) +(require 'cl) (require 'cl-lib)

(defgroup company-c-headers nil @@ -143,7 +144,7 @@ Filters on the appropriate regex for the current major mode." (setq next nil) tmp))) )

linux40 commented 5 years ago

Please use cl-remove-duplicates. I got a warning from this package for (require 'cl).

randomphrase commented 5 years ago

Done, thanks for letting me know.