diff --git a/platform/lang-impl/src/com/intellij/application/options/colors/ColorAndFontOptions.java b/platform/lang-impl/src/com/intellij/application/options/colors/ColorAndFontOptions.java index 87e2c8c353e0..f8907df084c4 100644 --- a/platform/lang-impl/src/com/intellij/application/options/colors/ColorAndFontOptions.java +++ b/platform/lang-impl/src/com/intellij/application/options/colors/ColorAndFontOptions.java @@ -532,7 +532,7 @@ public class ColorAndFontOptions extends SearchableConfigurable.Parent.Abstract } mySelectedScheme = mySchemes.get(EditorColorsManager.getInstance().getGlobalScheme().getName()); - //assert mySelectedScheme != null : EditorColorsManager.getInstance().getGlobalScheme().getName() + "; myschemes=" + mySchemes; + assert mySelectedScheme != null : EditorColorsManager.getInstance().getGlobalScheme().getName() + "; myschemes=" + mySchemes; } private static void initScheme(@NotNull MyColorScheme scheme) { diff --git a/platform/platform-impl/src/com/intellij/openapi/editor/colors/impl/EditorColorsManagerImpl.java b/platform/platform-impl/src/com/intellij/openapi/editor/colors/impl/EditorColorsManagerImpl.java index 21a9e7bb7ea3..dee7f9d49814 100644 --- a/platform/platform-impl/src/com/intellij/openapi/editor/colors/impl/EditorColorsManagerImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/editor/colors/impl/EditorColorsManagerImpl.java @@ -314,6 +314,17 @@ public class EditorColorsManagerImpl extends EditorColorsManager implements Pers @Override public EditorColorsScheme getGlobalScheme() { EditorColorsScheme scheme = mySchemeManager.getCurrentScheme(); + String editableCopyName = null; + if (scheme instanceof DefaultColorsScheme && ((DefaultColorsScheme)scheme).hasEditableCopy()) { + editableCopyName = ((DefaultColorsScheme)scheme).getEditableCopyName(); + } + else if (scheme instanceof BundledScheme) { + editableCopyName = ((BundledScheme)scheme).getEditableCopyName(); + } + if (editableCopyName != null) { + EditorColorsScheme editableCopy = getScheme(editableCopyName); + if (editableCopy != null) return editableCopy; + } return scheme == null ? getDefaultScheme() : scheme; }