Don't force line selection
Opened this issue · 2 comments
Currently, when opening a file in GitLab for example, line selection seems to be forced. I.e. if the cursor is at line one the URL will be like #L1-1
. In most of my use cases so far I want to generate a link without a line selection being forced if I am halfway down a file. I think that it might be more useful to only include line selection in a generated link if there is a highlighted single or multi line caret in the editor - Otherwise the line selection part of the URL generation should be ignored. Alternatively, another menubar option can be added to just "Link to file" which ignores line selection completely, however that seems a bit unintuitive.
This may be an individual preference of mine but I think it makes sense from a user experience perspective!
I will try to contribute but haven't had much experience with working on the IntelliJ platform!
It makes sense to not create links to a single line when right-clicking in the actual code without anything selected. However, it would make sense when right-clicking in the gutter (where line numbers usually are).
Additionally, I would suggest to make it clear in the plugin page that the generated links do include line hashes. THAT's the killer feature hahahah
Also, when right-clicking a file in Solution Explorer and choosing "Tools>Open in GitLab" it put the line hashes for the selection in the currently opened file, which makes no sense.