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 193036 - EditorUI.updateLineHeight resets maxHeight when HighlightingManager.LINEWRAP_ENABLED
Summary: EditorUI.updateLineHeight resets maxHeight when HighlightingManager.LINEWRAP_...
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Painting & Printing (show other bugs)
Version: 7.0
Hardware: PC All
: P3 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-08 09:31 UTC by emi
Modified: 2011-10-07 12:29 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description emi 2010-12-08 09:31:46 UTC
Hy,

I've noticed a weird bug in my code where changing programatically the editor font breaks code folding (it's related to an older bug #153316 ).

The underlying problem with the latest codebase seems to be the EditorUI.updateLineHeight method which has this 'if' at the end:

        if (HighlightingManager.LINEWRAP_ENABLED) {
            maxHeight = -1;
            View rootView = Utilities.getDocumentView(component);
            ...
        }

What this seems to do is reset maxHeight and only take into consideration the data for the first line. I think this breaks the notion of holding the maximum height into maxHeight.

What I've done on my side is disable LINEWRAP_ENABLED entirely but I think the -1 reset looks suspicious.
Comment 1 Miloslav Metelka 2011-10-07 12:29:00 UTC
LINEWRAP_ENABLED is no longer active since there is no longer an option to use the original painting through DrawEngine related classes.
I assume this is fixed due to many fixes that were done. If not please reopen the issue. Thanks.