ben-gibson / GitLink

A Jetbrains plugin that opens a local file under Git version control in its remote host using the default browser.
https://plugins.jetbrains.com/plugin/8183-gitlink
MIT License
727 stars 59 forks source link

End of selection is off by one when selecting lines #326

Open l0b0 opened 7 months ago

l0b0 commented 7 months ago

Thank you for this fantastic plugin!

One nit is that I often select a bunch of lines (for example using Ctrl+w to expand the selection), and the resulting link created by GitLink includes the last line, even though I've not selected anything on that line. The last selected character is the newline before that line.

A couple of screenshots should clarify. I've triple-clicked line 12 to select that line:

image

If I right-click and press "Open in GitHub" (same result on GitLab), it goes to this page, where the next line is also selected:

image