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

Summary: EditorUI.updateLineHeight resets maxHeight when HighlightingManager.LINEWRAP_ENABLED
Product: editor Reporter: emi <emi>
Component: Painting & PrintingAssignee: Miloslav Metelka <mmetelka>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 7.0   
Hardware: PC   
OS: All   
Issue Type: DEFECT Exception Reporter:

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.