Commit 0b1f521e authored by Julia Beliaeva's avatar Julia Beliaeva Committed by intellij-monorepo-bot
Browse files

[git-index] add recent commit messages into completion suggestions even without changelists

IDEA-253961

(cherry picked from commit fbc713862397254d9d26def48763d70b2c8f2ee3)

GitOrigin-RevId: 8b4c23cc246f616d05b085e85404f2c6d9d933c5
parent 5144a420
Showing with 1 addition and 4 deletions
+1 -4
......@@ -54,9 +54,6 @@ public class CommitCompletionContributor extends CompletionContributor {
result.stopHere();
int count = parameters.getInvocationCount();
List<ChangeList> lists = commitMessage.getChangeLists();
if (lists.isEmpty()) return;
String prefix = TextFieldWithAutoCompletionListProvider.getCompletionPrefix(parameters);
if (count == 0 && prefix.length() < 5) {
result.restartCompletionOnPrefixChange(StandardPatterns.string().withLength(5));
......@@ -65,7 +62,7 @@ public class CommitCompletionContributor extends CompletionContributor {
CompletionResultSet resultSet = result.caseInsensitive().withPrefixMatcher(
count == 0 ? new PlainPrefixMatcher(prefix, true) : new CamelHumpMatcher(prefix));
CompletionResultSet prefixed = result.withPrefixMatcher(new PlainPrefixMatcher(prefix, count == 0));
for (ChangeList list : lists) {
for (ChangeList list : commitMessage.getChangeLists()) {
ProgressManager.checkCanceled();
for (Change change : list.getChanges()) {
ProgressManager.checkCanceled();
......
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