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.
GlyphGutter is resized only if there are added new lines to the file. This causes that if there is one line in the editor after adding and removing again another 100 lines of text the gutter stays wide.
Created attachment 58365 [details] Fix for this bug - changed when should be the GlyphGutter resized
Thanks for the patch, but this actually may have been intentional to prevent repeated resizing when for example adding and deleting lines around the line 100. Whoever is going to apply the patch please make sure that there are no strange side effects. I personally think that it is perfectly ok for the gutter to stay wide.
Maybe this was intentional but I doubt it has any rational background - or at least has now in 6.x with JRE 1.5/1.6 - because the resize and following repaint is really fast. I tried to experiment with editor window full of characters so after resize also bottom scrollbar appeared and everything was immediately redrawn. To rationalize why is IMHO not OK to leave the gutter wide - if you have big monitor it probably does not bother you but people with smaller resolutions are hunting pixels of free space. Resize is in the most common case done only when adding or removing the 10th, 100th, 1000th,... line. I do not think you will be adding and removing lines around that bounds to often, you either add new lines (writing new code) or remove lines (refactoring, simplifying).
Fair enough, what you are saying makes sense.
I also checked behaviour of other IDEs. Eclipse has minimum size of two chars but if the number is larger than 99 then it resizes the gutter. Idea resizes always but what is interesting not when adding lines 9->10 or 99->100 but 7->8, 97->98 (probably a bug)
Patch applied, thanks. http://hg.netbeans.org/main/rev/a4cca3cdbaf5