VSCodeVim / VSCodeVim/Vim

[bug] Using vscode shortcuts to switch between compressedFolders caused problems `Cannot read property 'previous' of undefined`

Open
#6,183 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

How to reproduce the bug

  1. I use these shortcuts to switch left or right in compressedFolders:

    {
      "key": "shift+h",
      "command": "previousCompressedFolder",
      "when": "explorerViewletCompressedFocus && explorerViewletVisible && filesExplorerFocus && !explorerViewletCompressedFirstFocus && !inputFocus"
    },
    {
      "key": "shift+l",
      "command": "nextCompressedFolder",
      "when": "explorerViewletCompressedFocus && explorerViewletVisible && filesExplorerFocus && !explorerViewletCompressedLastFocus && !inputFocus"
    },
    {
      "key": "g h",
      "command": "firstCompressedFolder",
      "when": "explorerViewletCompressedFocus && explorerViewletVisible && filesExplorerFocus && !explorerViewletCompressedFirstFocus && !inputFocus"
    },
    {
      "key": "g l",
      "command": "lastCompressedFolder",
      "when": "explorerViewletCompressedFocus && explorerViewletVisible && filesExplorerFocus && !explorerViewletCompressedLastFocus && !inputFocus"
    },
    
  2. Here is the workspace structure which the bug occurred:

    .
    └── test
        └── test1
            ├── test2
            └── test3
                └── README.md
    

    image

  3. Make sure the folders are expand. Don't fold them

  4. All you need to do is ctrl + shift + p to execute command workbench.action.reloadWindow. After reloading, try to use shortcuts above to switch between folder test and test1, then the bug notice Cannot read property 'previous' of undefined or Cannot read property 'next' of undefined will be shown in the rightdown corner:

    image

Some information may be useful

OS:
    Manjaro KDE Edition
VSCode Version:
    1.53.2
Vim Version:
    1.18.9

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

Reproduce the issue in the shown test/test1/test2/test3/README.md workspace with the listed previousCompressedFolder, nextCompressedFolder, firstCompressedFolder, and lastCompressedFolder shortcuts after running workbench.action.reloadWindow. Trace those command entry points and verify that switching between expanded compressed folders no longer reports an undefined previous or next property.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.