Ability to link to a line of code #738

Closed
tylerball opened this Issue Apr 25, 2012 · 7 comments

9 participants

@tylerball

It would be awesome if you could click on line numbers in a file preview and retrieve a permalink to that specific line.

@jameswritescode
GitLab member

+1 on this, would be useful

@drudge

+1

@apmorton

In the commit I referenced you will find the changes I made to implement this feature for my own install of gitlab.
For the record, the lineseparator option is not required, but made for more readable source output while I was debugging this and I chose to leave it.

Another thing to note is that when you click the links in line numbers it does the 'woosh' animation that happens when you open a file from the tree. This should probably be avoided with some fancy javascript to conditionally do history.pushState only on the pages initial load or something? Because it also causes another browser history entry every to be made every time you click a line number.

@NARKOZ NARKOZ was assigned Sep 16, 2012
@riyad

Just landed on master (see #1937). :)

@riyad riyad closed this Jan 11, 2013
@gaui

Line-range would be nice :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment