GitLink icon indicating copy to clipboard operation
GitLink copied to clipboard

End of selection is off by one when selecting lines

Open l0b0 opened this issue 4 months ago • 0 comments

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

l0b0 avatar Mar 05 '24 00:03 l0b0