Commit 5144a420 authored by Julia Beliaeva's avatar Julia Beliaeva Committed by intellij-monorepo-bot
Browse files

[commit] append recent commit messages to completion suggestions only once

(cherry picked from commit 49d77524ed510bd734f3aa4a0c6c002ff5d8a0b8)

GitOrigin-RevId: 5e727852cf5e6268be06b83b6f75fd1dd1572621
parent e4b95400
Branches unavailable Tags unavailable
No related merge requests found
Showing with 8 additions and 8 deletions
+8 -8
......@@ -81,15 +81,15 @@ public class CommitCompletionContributor extends CompletionContributor {
}
}
}
}
if (count > 0) {
result.caseInsensitive()
.withPrefixMatcher(new PlainPrefixMatcher(prefix))
.addAllElements(
StreamEx.of(VcsConfiguration.getInstance(project).getRecentMessages())
.reverseSorted()
.map(lookupString -> PrioritizedLookupElement.withPriority(LookupElementBuilder.create(lookupString), Integer.MIN_VALUE)));
}
if (count > 0) {
result.caseInsensitive()
.withPrefixMatcher(new PlainPrefixMatcher(prefix))
.addAllElements(
StreamEx.of(VcsConfiguration.getInstance(project).getRecentMessages())
.reverseSorted()
.map(lookupString -> PrioritizedLookupElement.withPriority(LookupElementBuilder.create(lookupString), Integer.MIN_VALUE)));
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment