Skip to content

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

@l0b0

Description

@l0b0

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions