Introduced support for two distinct line jump specifications used by GitHub and GitLab:
Line jump specification is implemented in a very similar fashion to all the other line jump specifications.
GitHub / GitLab example: autoload/fetch.vim#L6
Line range specification is implemented by relying on normal mode commands.
When opening a line range vim will enter linewise Visual mode and pre-select all the lines in the range. The cursor will be placed at the start of the selected range.
However zO, used with in s:setpos caused vim to drop out of Visual mode, thus loosing the selection. To fix that, I've replaced it with foldopen!.
Introduced support for two distinct line jump specifications used by GitHub and GitLab:
Line jump specification is implemented in a very similar fashion to all the other line jump specifications.
GitHub / GitLab example:
autoload/fetch.vim#L6
Line range specification is implemented by relying on normal mode commands.
When opening a line range vim will enter linewise Visual mode and pre-select all the lines in the range. The cursor will be placed at the start of the selected range.
However
zO
, used with ins:setpos
caused vim to drop out of Visual mode, thus loosing the selection. To fix that, I've replaced it withfoldopen!
.GitHub example:
autoload/fetch.vim#L6-L10
GitLab example:autoload/fetch.vim#L6-10