philc / philc/vimium

The unmap command followed by a comment is ignored

Open
#3,839 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
27k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

When the unmap command in the custom key mappings is followed by a comment, it's ignored and doesn't have any effect. The map command doesn't have such an issue.

To Reproduce

  1. Add the following commands to the Vimium's custom key mappings and save them:

     map A Vomnibar.activate  # test
     unmap A  # test
    
  2. Open the Vimuim's help and check the first command under the Using the vomnibar section (top right column) - it has the A key assigned even though it should be unmapped

  3. Remove the comment after the unmap A command in the custom key mappings and save them:

     map A Vomnibar.activate  # test
     unmap A
    
  4. Open the Vimuim's help and check the first command under the Using the vomnibar section (top right column) - the A key is not assigned as expected, because it has been unmapped

Browser and Vimium version

Vivaldi 4.0.2312.27 64-bit (Chromium 91.0.4472.102)
Wavebox 10.0.542.2 (Chromium 91.0.4472.77)
Vimium 1.66

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how custom key mappings parse the map and unmap commands, especially trailing comments, then follow how the mappings appear in Vimium's help. Reproduce the two mapping examples from the issue and verify that a commented unmap A removes the A assignment just like an uncommented command.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.