Skip to content

which-key breaks vim.v.count in visual mode #2047

Description

@nathanzeng

This bug has been reported in which-key here, but that was 2 years ago so it seems unlikely that it will be fixed. Making an issue here for discussion.

Reproduction

  1. Go to this line (currently 901 on master), and put your cursor on the first '. I marked cursor pos with | |
    local parsers = { |'|bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }
  2. Type v]n2]n
    Confirm that 'diff' is selected when in reality 'html' should be selected
  3. To confirm that which-key is the issue, remove the installation lines for only which-key, and do the above steps again

Discussion
While certainly an edge case, this is indeed a bug. #2046 stops which-key from triggering in visual mode to fix this, but I don't think it's a good solution. Open to discussion for better solutions.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions