harrisoncramer/gitlab.nvim

jump_to_reviewer jumps to wrong window

jakubbortlik opened this issue · 3 comments

Bug Description

Most of the time jump_to_reviewer jumps to the "new" window, even if diagnostic is placed in the "old" window.

Reproduction Steps

Let's create file.txt in base branch, that contains the following text:

abc
def
hij

In the feature branch that I want to merge into base branch it is changed to:

abc
xyz
defg
hij

Now, when I make comments on all the old and new lines, only the comment on line def actually takes me to the "old" window. For all other notes, jump_to_reviewer takes me to the "new" window, even for those made explicitly on lines 1 and 3 in the "old" window and those for lines 1 and 4 in the "new" window which have their diagnostic placed in the "old" window with the message "gitlab.nvim: Comments on unmodified lines will be placed in the old file".

Ah, I see that this is already known (lua/gitlab/reviewer/diffview.lua lines 100-106). Will think about how to fix it.

I wouldn't focus on fixing this until I've finished some work on refactoring and fixing the way we make multiline comments. It's a bit of a mess the same way that single-line comments were. But yes I'm aware of this issue and will look into it shortly.

Fixed by #206