Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use default sort order when custom sort order is identical #957

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

valepakh
Copy link
Contributor

@valepakh valepakh commented Mar 21, 2024

This fixes #956
It seems that using a map for sorting is unnecessary since the Candidate.compareTo already uses proper comparison of sort order and if they are equal, uses values for sorting candidates.
Sorting the candidates directly will also use the custom sorting basing on overriding the compareTo method.

@gnodet gnodet merged commit b982407 into jline:master Apr 17, 2024
4 checks passed
@gnodet gnodet added this to the 3.26.0 milestone Apr 17, 2024
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.

Duplicate completion sort order skips candidates
2 participants