Skip to content

Conversation

alexander-yakushev
Copy link
Member

This has been briefly discussed here #3659 (comment) before making basic the prioritized one.

The current setup produces a bug when Compliment returns a list of candidates that matches flex style, but only one of the items on that list matches basic style. In that case, Emacs will eagerly complete that single candidate without presenting a list.

Example:

Unsa instantly completes to UnsatisfiedLinkError (because that's a class that is always imported to all namespaces).

Desired behavior:

image

Copy link
Member

@bbatsov bbatsov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks!

@bbatsov bbatsov merged commit d430ab3 into master Jun 2, 2024
@bbatsov bbatsov deleted the flex-first branch June 2, 2024 07:56
(setq found-styles '(styles basic)))
(unless (member 'flex found-styles)
(setq found-styles (append found-styles '(flex))))
(setq found-styles (apply #'list 'styles 'flex (cdr found-styles))))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you can add here a comment similar to the description of the ticket, so people would understand better the need for this bit of code. Feel free do directly commit the comment if you agree with me it'd be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants