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.
See the attached screenshot. What looks like "nr" should actually be "nm". It seems that the width is not correctly calculated.
Created attachment 105997 [details] Screenshot
*** Bug 222183 has been marked as a duplicate of this bug. ***
Created attachment 127902 [details] Patch for solving the issue in the annotation bar I like to propose a patch to solve the issue with the annotation bar. Cause of the issue: "texts with the same number of chars may have different widths in non-monospaced fonts. for example: 'nr' and 'nm' - so we have to calculate the widest one" @NetBeans-Dev: a) Please review, discuss and commit. b) Can you also recheck the implementation against the git/svn/hg-impl? git - uses monospaced font in annotation bar svn - ??? not tested hg - uses non-monospaced font in annotation bar cvs - used non-monospaced font in annotation bar c) Please note that the issue with the truncated username in the tooltip from the closed duplicate http://netbeans.org/bugzilla/show_bug.cgi?id=222183 is not part of this patch and is still unresolved
b) cvs, svn and hg work the same way. Git is different, it paints the bar in the same font as is set in the editor, however when user sets non-monospaced font for editor git will face the same problem c) i reopened the bug, let's find solution for the tooltip there a) your patch works correctly, however i am afraid of performance impacts. For files with a lot lot of lines it could take some time. I saw slownesses in Search History where we're trying to get the width for all items in the summary view. Wouldn't the best solution here be to paint everything in the bar in monospace font? Or e.g. paint in the same font as in editor and in case it's not a monospace font only then use your width computation?
I will apply your patch but in case of any performance problems be ready to take responsibility and fix it.
applied: core-main #5a1cea350118