diff --git a/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupCellRenderer.java b/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupCellRenderer.java
index 2b040a356eee..f752b376ba5e 100644
--- a/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupCellRenderer.java
+++ b/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupCellRenderer.java
@@ -243,7 +243,6 @@ public class LookupCellRenderer implements ListCellRenderer {
myTypeLabel.append(labelText);
}
- myTypeLabel.setBackground(Color.YELLOW);
myTypeLabel.setBackground(sampleBackground);
myTypeLabel.setForeground(item instanceof EmptyLookupItem ? EMPTY_ITEM_FOREGROUND_COLOR : foreground);
return used;
diff --git a/platform/platform-api/src/com/intellij/ui/SimpleColoredComponent.java b/platform/platform-api/src/com/intellij/ui/SimpleColoredComponent.java
index 2c235d6014f3..203faa8d5f8f 100644
--- a/platform/platform-api/src/com/intellij/ui/SimpleColoredComponent.java
+++ b/platform/platform-api/src/com/intellij/ui/SimpleColoredComponent.java
@@ -101,23 +101,31 @@ public class SimpleColoredComponent extends JComponent {
* Appends string fragments to existing ones. Appended string
* will have specified attributes.
*/
- public synchronized void append(@NotNull final String fragment, @NotNull final SimpleTextAttributes attributes, boolean isMainText) {
- myFragments.add(fragment);
- myAttributes.add(attributes);
- if (isMainText) {
- myMainTextLastIndex = myFragments.size() - 1;
+ public void append(@NotNull final String fragment, @NotNull final SimpleTextAttributes attributes, boolean isMainText) {
+ synchronized (this) {
+ myFragments.add(fragment);
+ myAttributes.add(attributes);
+ if (isMainText) {
+ myMainTextLastIndex = myFragments.size() - 1;
+ }
}
+ revalidate();
+ repaint();
}
- public synchronized void append(@NotNull final String fragment, @NotNull final SimpleTextAttributes attributes, Object tag) {
- append(fragment, attributes);
- if (myFragmentTags == null) {
- myFragmentTags = new ArrayList