VSCodeVim / VSCodeVim/Vim

Failed to handle key `(`: Invalid regular expression: /r(/: Unterminated group

Open
#8,164 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

easymotion

\2sa( or \2sb) or \3sab) etc

VSCodeVim version: 1.24.3

Stack trace
SyntaxError: Failed to handle key `(`: Invalid regular expression: /r(/: Unterminated group
    at new RegExp (<anonymous>)
    at getMatchesForString (c:\Users\serj\.vscode\extensions\vscodevim.vim-1.24.3\src\actions\plugins\easymotion\easymotion.cmd.ts:133:9)
    at t.SearchByCharCommand.getMatches (c:\Users\serj\.vscode\extensions\vscodevim.vim-1.24.3\src\actions\plugins\easymotion\easymotion.cmd.ts:154:12)
    at t.SearchByCharCommand.exec (c:\Users\serj\.vscode\extensions\vscodevim.vim-1.24.3\src\actions\plugins\easymotion\easymotion.cmd.ts:78:28)
    at t.SearchByCharCommand.fire (c:\Users\serj\.vscode\extensions\vscodevim.vim-1.24.3\src\actions\plugins\easymotion\easymotion.cmd.ts:163:16)
    at g.exec (c:\Users\serj\.vscode\extensions\vscodevim.vim-1.24.3\src\actions\plugins\easymotion\easymotion.cmd.ts:329:20)
    at process.j (node:internal/process/task_queues:96:5)
    at g.execCount (c:\Users\serj\.vscode\extensions\vscodevim.vim-1.24.3\src\actions\base.ts:215:42)
    at I.actionToRecord [as runAction] (c:\Users\serj\.vscode\extensions\vscodevim.vim-1.24.3\src\mode\modeHandler.ts:739:47)
    at I.handledAsAction [as handleKeyAsAnAction] (c:\Users\serj\.vscode\extensions\vscodevim.vim-1.24.3\src\mode\modeHandler.ts:688:43)
    at I.text [as handleKeyEvent] (c:\Users\serj\.vscode\extensions\vscodevim.vim-1.24.3\src\mode\modeHandler.ts:505:11)
    at c:\Users\serj\.vscode\extensions\vscodevim.vim-1.24.3\extensionBase.ts:359:73

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 in src/actions/plugins/easymotion/easymotion.cmd.ts, especially getMatchesForString at line 133, using the reported easymotion input involving ( to reproduce the failure. Trace how the search pattern is formed and verify that the action completes without an unterminated regular-expression error for the reported key.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vim, vscode
Domain
devtools
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.