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

Cannot read property 'selection' of undefined #2099

Closed
ppasieka opened this issue Oct 27, 2017 · 2 comments
Closed

Cannot read property 'selection' of undefined #2099

ppasieka opened this issue Oct 27, 2017 · 2 comments

Comments

@ppasieka
Copy link

ppasieka commented Oct 27, 2017

  • Click thumbs-up 👍 on this issue if you want it!
  • Click confused 😕 on this issue if not having it makes VSCodeVim unusable.

The VSCodeVim team prioritizes issues based on reaction count.


Is this a BUG REPORT:

  • VSCode Version: 1.17.2
  • VsCodeVim Version: 0.10.2
  • OS: Windows 10

What happened:

Error occur:
image

Cannot read property 'selection' of undefined: TypeError: Cannot read property 'selection' of undefined
    at t.navigate (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:28:2501577)
    at t.last (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:28:2501036)
    at t.run (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:28:2894265)
    at file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:28:2615209
    at n.Class.derive._oncancel.then (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:28:60387)
    at p (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:28:2615166)
    at file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:28:2614886
    at t.invokeFunction (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:28:1089386)
    at t._tryExecuteCommand (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:28:1080627)
    at file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:28:1080327

How to reproduce it:

  1. Open long file ... to reach EOF you have to scroll it .
  2. Go to INSERT MODE ( I use i key) somewhere on the beginning of the file
  3. Leave INSERT MODE (ESC key)
  4. Hold 'j' key to scroll file down. Line where you went to INSERT mode shouldn't be visible anymore
  5. Press 2x single quote key '' or 2x backtick key ``

This is scenario where I can reproduce it every time. There is also way to have same error with gi combination (this is how I encounter this bug first time) but now I cannot figure out right steps.

I think that this bug was introduced in last release, but I'm not 100% sure.

EDIT:
You don't have to go to INSERT mode... it is enough to scroll in that way that line you were starting on scrolling is not visible on screen anymore ... then ''

@westim
Copy link
Contributor

westim commented Oct 27, 2017

Duplicate of #2031.

@jpoon
Copy link
Member

jpoon commented Nov 6, 2017

Let's use #2031 to track.

@jpoon jpoon closed this as completed Nov 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants