VSCodeVim / Vim

:star: Vim for Visual Studio Code
http://aka.ms/vscodevim
MIT License
13.99k stars 1.32k forks source link

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

Open sabinm677 opened 2 years ago

sabinm677 commented 2 years ago

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 commented 2 years ago

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 commented 1 year ago

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 commented 1 year ago

Any update on this issue?