OSDN Git Service

Merge branch 'fix/line-numbers' into 'master'
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Fri, 31 Jan 2014 07:54:50 +0000 (07:54 +0000)
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Fri, 31 Jan 2014 07:54:50 +0000 (07:54 +0000)
commit9939c04e1808703c801327000ea8f99f33d8e936
tree46e8dc916a50baf26632f86d11604ec20771139e
parent74f1da10d1e6923c347426de9603df7bd8919e09
parent25d93987d4667ad1aa1d9550117685ce14f9d5cb
 Merge branch 'fix/line-numbers' into 'master'

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