mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
correct common prefix case for case-insensitive items
This commit is contained in:
@@ -1086,13 +1086,13 @@ public class LookupImpl extends LightweightHint implements LookupEx, Disposable
|
||||
final PrefixMatcher firstItemMatcher = itemMatcher(firstItem);
|
||||
final String oldPrefix = firstItemMatcher.getPrefix();
|
||||
final String presentPrefix = oldPrefix + myAdditionalPrefix;
|
||||
String commonPrefix = firstItem.getLookupString();
|
||||
String commonPrefix = handleCaseInsensitiveVariant(itemMatcher(firstItem).getPrefix(), firstItem.getLookupString());
|
||||
|
||||
for (int i = 1; i < listModel.getSize(); i++) {
|
||||
LookupElement item = (LookupElement)listModel.getElementAt(i);
|
||||
if (!oldPrefix.equals(itemMatcher(item).getPrefix())) return false;
|
||||
|
||||
final String lookupString = item.getLookupString();
|
||||
final String lookupString = handleCaseInsensitiveVariant(itemMatcher(item).getPrefix(), item.getLookupString());
|
||||
final int length = Math.min(commonPrefix.length(), lookupString.length());
|
||||
if (length < commonPrefix.length()) {
|
||||
commonPrefix = commonPrefix.substring(0, length);
|
||||
|
||||
Reference in New Issue
Block a user