diff -r 3a56dd00b58b editor.lib/src/org/netbeans/editor/BaseCaret.java --- a/editor.lib/src/org/netbeans/editor/BaseCaret.java Wed Dec 10 15:17:26 2008 +0200 +++ b/editor.lib/src/org/netbeans/editor/BaseCaret.java Wed Dec 10 15:26:08 2008 +0200 @@ -303,9 +303,16 @@ FontColorSettings fcs = MimeLookup.getLookup(org.netbeans.lib.editor.util.swing.DocumentUtilities.getMimeType(c)).lookup(FontColorSettings.class); if (fcs != null) { - AttributeSet attribs = fcs.getFontColors(FontColorNames.CARET_COLOR_INSERT_MODE); //NOI18N - if (attribs != null) { - caretColor = (Color) attribs.getAttribute(StyleConstants.Foreground); + if (overwriteMode) { + AttributeSet attribs = fcs.getFontColors(FontColorNames.CARET_COLOR_OVERWRITE_MODE); //NOI18N + if (attribs != null) { + caretColor = (Color) attribs.getAttribute(StyleConstants.Foreground); + } + } else { + AttributeSet attribs = fcs.getFontColors(FontColorNames.CARET_COLOR_INSERT_MODE); //NOI18N + if (attribs != null) { + caretColor = (Color) attribs.getAttribute(StyleConstants.Foreground); + } } }