Skip to content

Cannot jump to discussion tree when Notes are open #480

@jakubbortlik

Description

@jakubbortlik

Prerequsities

  • I'm on the latest version of the plugin
  • I've installed the required dependencies
  • I've run :h gitlab.nvim.troubleshooting and followed the steps there

Bug Description

Jumping to discussion tree from reviewer doesn't work when the Notes tab is open.

Reproduction Steps

  1. Check out the feature branch
  2. Open Neovim and start a review
  3. Create two comments.
  4. Switch the discussion tree view from Inline comments to Notes
  5. Go to the second comment in the reviewer (it has to be the second one so that the cursor position is outside the buffer, see the error message below)
  6. Press the "Move to discussion" keymap (a by default)

Error

E5108: Error executing lua: ...lazy/gitlab.nvim/lua/gitlab/actions/discussions/init.lua:182: Cursor position outside buffer
stack traceback:
	[C]: in function 'nvim_win_set_cursor'
	...lazy/gitlab.nvim/lua/gitlab/actions/discussions/init.lua:182: in function 'jump_after_tree_opened'
	...lazy/gitlab.nvim/lua/gitlab/actions/discussions/init.lua:189: in function 'jump_after_menu_selection'
	...lazy/gitlab.nvim/lua/gitlab/actions/discussions/init.lua:214: in function 'cb'
	.../.local/share/nvim/lazy/gitlab.nvim/lua/gitlab/async.lua:26: in function 'fetch'
	.../.local/share/nvim/lazy/gitlab.nvim/lua/gitlab/async.lua:61: in function 'move_to_discussion_tree_from_diagnostic'
	...share/nvim/lazy/gitlab.nvim/lua/gitlab/reviewer/init.lua:429: in function <...share/nvim/lazy/gitlab.nvim/lua/gitlab/reviewer/init.lua:428>

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions