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.
Take a look at the attached picture and swf movie. The swf file is a flash recording of the interaction with a diff pane while having portions of the text selected. You'll note at the end of the movie how the text gets selected. The reason is that my mouse movement trigers the repaint for discrete regions of the editor view which requests for highlights only for pieces of the document (startOffset !=0). The bug is that DiffContentPanel.getHighlights doesn't respect the given start and end offset. More exactly, the returned sequence might have the first startOffset smaller than the requested offset. The bug will show up only when you have some layers on top of this layer -- like the text selection layer. The patch for this is trivial, just change DiffContentPanel.DiffHighlightsSequence.getStartOffset and getEndOffset to return Math.max respectively Math.min values compared to the this.startOffset and this.endOffset.
Created attachment 77342 [details] Screenshot of the diff repaint bug
Created attachment 77343 [details] Video showing the highlighting bug in real time happening due to the mouse movement which trigers repaint request
applying emi's patch (cdev repo) changeset : 123904:ba155f93e74b author : Ondrej Vrabec <ovrabec@netbeans.org> date : Fri Mar 27 14:28:10 CET 2009 summary : #159122 - DiffContentPanel.getHighlights doesn't respect startOffset and endOffset applying suggested patch thanks to emi, hope it would work
Integrated into 'main-golden', will be available in build *200903281400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/ba155f93e74b User: Ondrej Vrabec <ovrabec@netbeans.org> Log: #159122 - DiffContentPanel.getHighlights doesn't respect startOffset and endOffset applying suggested patch