Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to handle key 2: Cannot read properties of undefined (reading 'uri') #8059

Open
sabinm677 opened this issue Oct 25, 2022 · 3 comments

Comments

@sabinm677
Copy link

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

VSCodeVim version: 1.24.1

Stack trace
TypeError: Failed to handle key `2`: Cannot read properties of undefined (reading 'uri')
    at u.execute (c:\Users\Acer\.vscode\extensions\vscodevim.vim-1.24.1\src\cmd_line\commands\tab.ts:159:52)
    at p.handleRemapping (c:\Users\Acer\.vscode\extensions\vscodevim.vim-1.24.1\src\configuration\remapper.ts:512:44)
    at p.sendKey (c:\Users\Acer\.vscode\extensions\vscodevim.vim-1.24.1\src\configuration\remapper.ts:369:20)
    at t.Remappers.sendKey (c:\Users\Acer\.vscode\extensions\vscodevim.vim-1.24.1\src\configuration\remapper.ts:39:26)
    at process.handledAsRemap (node:internal/process/task_queues:96:5)
    at N.text [as handleKeyEvent] (c:\Users\Acer\.vscode\extensions\vscodevim.vim-1.24.1\src\mode\modeHandler.ts:486:9)
    at c:\Users\Acer\.vscode\extensions\vscodevim.vim-1.24.1\extensionBase.ts:359:73
@sabinm677
Copy link
Author

Second tab was VSCode get started page. When I try to switch to second tab it is showing this error.

My mapping

nmap <Leader>2 :tabn 2<cr>

@Buzzkill-McSquare
Copy link

There seems to be a general error with the :tabn command. I've noticed that it always tabs from the first editor tab regardless of focus, it doesn't wrap and some number arguments result in the same error that @sabinm677 posted.

The :tabp command works fine - it'll take any number and wrap around the group's tabs if the argument exceeds the number of tabs.

@sabinm677
Copy link
Author

Any update on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants