Skip to content

Ranged comments don't set range correctly #478

@jakubbortlik

Description

@jakubbortlik

Bug Description

The line range of a comment is not properly applied in Gitlab. If I create a ranged comment in Gitlab online, it actually contains the range information (it's the second comment in the screenshot below).

The missing range information is not just cosmetic it also makes it impossible to properly insert a suggestion in the gitlab.nvim "ranged" comment. If I want to modify it and click "Insert suggestion" it pastes this:

```suggestion:-0+0
abc
```

Instead of the correct:

```suggestion:-1+0
defghi
abc
```

The problem is that setting this correctly from within gitlab.nvim may currently not be possible due to limitations of the Gitlab API and of the go library that only seem to allow setting the line code and line position type ("old" vs "new").

Screenshots

First image shows a comment created in gitlab.nvim, the second one is directly from Gitlab:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions