nb-codeoutline
nb-codeoutline copied to clipboard
Viewport highlighting is not accurate
NetBeans adds blank space in the editor at the bottom of files. The viewport highlighting in the code outline does not take this into account and highlights a different (larger) section of the file than is visible in the editor viewport (see example screenshot below).
To compensate for the blank space that NetBeans adds, the section highlighted in the code outline would either have to shrink correspondingly, or else sufficient blank space would have to be added to the bottom in the code outline as well. Personally, I think the first option would be preferable.
PS: The highlighting is inaccurate not just at the bottom, but throughout the file. The shorter the file, the more inaccurate it gets. Here is another example where the full code is visible in the editor window, but only part of it is highlighted in the code outline:
Thanks @nmatt: It depends somehow on the font-size. The font-size isn't taken in account.
I will have to dig deep in others code for that. So do not expect me to do this soon. The original code of BlueJ uses the font-size 1 IIRC, so the new font-size option from https://github.com/markiewb/nb-codeoutline/issues/20 may introduced this issue.