Skip to content

bug: vim.v.count1 is not passed correctly to the api functions #668

@xulongwu4

Description

@xulongwu4

Did you check docs and existing issues?

  • I have read all the trouble.nvim docs
  • I have updated the plugin to the latest version before submitting this issue
  • I have searched the existing issues of trouble.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

0.12.0 nightly

Operating system/version

Linux

Describe the bug

In the README file, it is mentioned that the go down to the next item and go up to the previous item actions support counts. However, when counts are provided to these actions, they are ignored and it always jumps to the next/previous item regardless of the counts.

Steps To Reproduce

  1. Open a file with a few diagnostic errors.
  2. Open the trouble window with document diagnostics.
  3. Press 3]], which should bring me to the third next item according to the documentation. Observe that it only jumps to the immediate next item.

Expected Behavior

It should jump according to the count provided by the user.

Some observations

I found that the value of vim.v.count1 is not preserved in the call to the wait() function. When I press 3]] in the trouble window, the following code snippet shows the following:

  • Check vim count 2 will print 3
  • check vim count 3 will print 1
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleThis issue or PR has been inactive for a whilewontfixThis issue will not be fixed or implemented

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions