This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 155143

Summary: BaseCaret doesn't respect CARET_COLOR_OVERWRITE_MODE anymore
Product: editor Reporter: emi <emi>
Component: Painting & PrintingAssignee: michaelpigg <michaelpigg>
Status: RESOLVED FIXED    
Severity: blocker CC: jkovalsky, tusharvjoshi
Priority: P3 Keywords: NETFIX, SIMPLEFIX
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Use CARET_COLOR_OVERWRITE_MODE in BaseCaret

Description emi 2008-12-10 14:43:15 UTC
Hy,

BaseCaret doesn't use the CARET_COLOR_OVERWRITE_MODE value anymore, it uses CARET_COLOR_INSERT_MODE for insert *and*
overwrite.

This seems to be a regression starting revision 84624 : d8ca6bd84a75 (
http://hg.netbeans.org/main/diff/d8ca6bd84a75/editor.lib/src/org/netbeans/editor/BaseCaret.java ).

See the attached patch which fixes the problem.

PS: I don't take credit for this patch, I'm just posting it here. It's done by Andreea Pitici, a work colleague of mine
from Joseki Bold.
Comment 1 emi 2008-12-10 14:44:01 UTC
Created attachment 74807 [details]
Use CARET_COLOR_OVERWRITE_MODE in BaseCaret
Comment 2 Miloslav Metelka 2009-01-07 13:01:40 UTC
Thanks for the patch. However there must be a visual setting added into the tools->options as well (currently there's
just 'Caret color').
Comment 3 emi 2009-01-07 13:16:33 UTC
Indeed I guess there should also something in Tools->Options.

But that doesn't keep the bug from happening when CARET_COLOR_OVERWRITE_MODE is changed programatically. This is how we
found the bug actually.
Comment 4 Jiri Kovalsky 2009-03-30 15:15:48 UTC
Miloslav Metelka agreed that he would review and integrate a patch for this issue contributed by the NetFIX [1] team.

[1] http://wiki.netbeans.org/NetFIX
Comment 5 Vitezslav Stejskal 2009-10-09 13:38:45 UTC
dd9f35712718 - applied the patch and added 'Caret Color (Overwrite mode)' among Tools-Options -> Fonts & Colors ->
Highlights. Thanks for the patch
Comment 6 Quality Engineering 2009-10-14 10:35:44 UTC
Integrated into 'main-golden', will be available in build *200910140201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/dd9f35712718
User: Vita Stejskal <vstejskal@netbeans.org>
Log: #155143: Adding 'Caret Color (Overwrite mode)' setting and fixing BaseCaret to use it (thanks to Emilian Bold and Andreea Pitici)