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

2x, 2s doesn't work #939

Closed
octref opened this issue Oct 18, 2016 · 6 comments
Closed

2x, 2s doesn't work #939

octref opened this issue Oct 18, 2016 · 6 comments
Labels

Comments

@octref
Copy link
Contributor

octref commented Oct 18, 2016

No effect when pressing 2x or 2s.

  • VSCode Version: 1.7
  • VsCodeVim Version: 0.3.8
  • OS: OS X 10.11.6
@rebornix
Copy link
Member

I can't repro this issue, neither can @xconverge . I'll have a quick check with you tomorrow.

@octref
Copy link
Contributor Author

octref commented Oct 19, 2016

Here are the error when I do 2s or 2x

shell.ts:442 Overlapping ranges are not allowed!: Error: Overlapping ranges are not allowed!
    at t.applyEdits (file:////Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:56:17157)
    at e.pushEditOperation (file:////Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:39:24298)
    at file:////Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:56:15362
    at i (file:////Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:29:22509)
    at t.e.deferredEmit (file:////Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:29:25586)
    at t.pushEditOperations (file:////Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:56:14492)
    at t.executeEdits (file:////Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:61:17739)
    at e.applyEdits (file:////Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:78:12694)
    at t.$tryApplyEdits (file:////Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:100:31521)
    at t.e.handle (file:////Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:100:9689)

Can you try this repro:

  1. Open new editor

  2. Paste

      private onFoo() {
      }
    
  3. Put cursor in here private |onFoo() {

  4. Do 2s

@johnfn
Copy link
Member

johnfn commented Oct 19, 2016

Strange, it works fine for me (even your provided example).

@octref
Copy link
Contributor Author

octref commented Oct 19, 2016

OK. I can't repro with my own example anymore 😂

I can still make this bug happen it in one of my file. Let me show @rebornix tomorrow.

@rebornix
Copy link
Member

rebornix commented Oct 19, 2016

The last call in Code we saw is applyEdit and it's saying we are editing against ranges which have overlap. I have a feeling that our postponed transformation lead to this problem as it's executed in parallel but I still need to dig into the code to see if that's the case.

@rebornix
Copy link
Member

We did the wrong overlap checking, which finally leads to the parallel execution of operations, which finally causes this bug.

@octref you are an insanely awesome bug hunter.

rebornix added a commit to rebornix/Vim that referenced this issue Oct 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants