diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/AreaMap.java b/platform/vcs-api/src/com/intellij/openapi/vcs/AreaMap.java index c9a4197ea3f8..fb2977423d8c 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/AreaMap.java +++ b/platform/vcs-api/src/com/intellij/openapi/vcs/AreaMap.java @@ -67,6 +67,10 @@ public class AreaMap, Val> { } } + public boolean contains(final Key key) { + return myKeys.contains(key); + } + public void getSimiliar(final Key key, final PairProcessor consumer) { final int idx = Collections.binarySearch(myKeys, key); if (idx < 0) { @@ -76,7 +80,7 @@ public class AreaMap, Val> { if (itemBeforeIdx >= 0) { for (int i = itemBeforeIdx; i >= 0; -- i) { final Key candidate = myKeys.get(i); - if (! myKeysResemblance.process(candidate, key)) break; + if (! myKeysResemblance.process(candidate, key)) continue; if (consumer.process(candidate, myMap.get(candidate))) break; // if need only a part of keys } }