Ignore nil-value completions
ci/woodpecker/push/woodpecker Pipeline failed Details

There is probably a bug in an undedlying completion strategy that is causing
these nil-values. But this function should be able to deal with that regardless
as completion-strategies may not always be stable. Especially if user-defined
strategies ever become a thing.
master
Hugo Thunnissen 2 months ago
parent ea133c2044
commit 0509d8c669

@ -69,11 +69,14 @@ candidate. Candidates can be indexed functions and variables.")
(cl-defmethod phpinspect--completion-list-add
((comp-list phpinspect--completion-list) (completion phpinspect--completion))
(setf (phpinspect--completion-list-has-candidates comp-list) t)
(unless (intern-soft (phpinspect--completion-value completion)
(phpinspect--completion-list-completions comp-list))
(set (intern (phpinspect--completion-value completion)
(phpinspect--completion-list-completions comp-list))
completion)))
;; Ignore completions in an invalid state (nil values)
(when (phpinspect--completion-value completion)
(unless (intern-soft (phpinspect--completion-value completion)
(phpinspect--completion-list-completions comp-list))
(set (intern (phpinspect--completion-value completion)
(phpinspect--completion-list-completions comp-list))
completion))))
(cl-defmethod phpinspect--completion-list-get-metadata
((comp-list phpinspect--completion-list) (completion-name string))

Loading…
Cancel
Save