pwntester / octo.nvim

Edit and review GitHub issues and pull requests from the comfort of your favorite editor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`next_comment` and `prev_comment` mapping doesn't work when all mappings are disabled

ckangnz opened this issue · comments

Issue Description

Type: bug report

Describe what happened (or what feature you want)

Configuration:

{
...
    mappings_disable_default = true,
    mappings = {
      issue = {
        next_comment = { lhs = "]c", desc = "Go to next comment" },
        prev_comment = { lhs = "[c", desc = "Go to previous comment" },
      },
      pull_requests = {
        next_comment = { lhs = "]c", desc = "Go to next comment" },
        prev_comment = { lhs = "[c", desc = "Go to previous comment" },
      },
      review_thread = {
        next_comment = { lhs = "]c", desc = "Go to next comment" },
        prev_comment = { lhs = "[c", desc = "Go to previous comment" },
      },
    },
}

I'm trying to get rid of all the unnecessary key maps from the default, and override with the ones I only need. Most of the key maps are working as expected, however, I found that the mapping on next_comment and prev_comment does not work at all when all mappings are disabled.

I tried toggling the mappings_disable_default back to false and it works when default mappings are applied.

I've only tried on pull_request btw, and it didn't work. It also didn't work on the review_thread view.

Describe what you expected to happen

When mappings_disable_default is set to true, and next_comment and prev_comment are mapped, I expect those keymaps to work.

How to reproduce it (as minimally and precisely as possible)

  1. Disable the default mappings using mappings_disable_default = true
  2. Apply new mappings for next_comment and prev_comment on pull_requests
  3. The mappings don't work as expected