Skip to content

Fix shifting line numbers.

When there are 1000 lines or more in a file, the link icon causes the numbers to shift down a line when you hover over the line number. This fixes that issue by setting a nowrap option for the line number anchor tag.

I also removed the fixed width of 60px for the line-numbers div as this causes issues for longer line numbers. I used visibility: hidden instead of display: none to ensure that the space for the link icon is taken into account. This way auto sizing the div does not cause any problems.

You can see the current behavior by looking at the following:

https://gitlab.com/gitlab-org/gitlab-ce/blob/master/vendor/assets/javascripts/ace-src-noconflict/mode-java.js

Merge request reports