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

Copy command broke in 1.11.0 release #4126

Closed
tjb-wiley opened this issue Oct 2, 2019 · 15 comments
Closed

Copy command broke in 1.11.0 release #4126

tjb-wiley opened this issue Oct 2, 2019 · 15 comments

Comments

@tjb-wiley
Copy link

Describe the bug
A clear and concise description of what the bug is.
On both my Mac and Ubuntu laptops, if I try to copy/paste code using the co command, like this:

:1,20co20

I get an error:

TaskQueue: Error running task. Failed to handle key= . nvim_buf_set_lines: Wrong type for argument 1, expecting Buffer.
Source: Vim (Extension)

To Reproduce
Steps to reproduce the behavior:

  1. Open any source file
  2. With "enable neovim" check in setting, try to copy/paste any lines

Expected behavior
Lines 1,20 should be copied after line 20

Screenshots
If applicable, add screenshots to help explain your problem.
If remapping-related, please attach log output: https://github.com/VSCodeVim/Vim#debugging-remappings.

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.11.0
  • VSCode version: 1.38.1
  • OS: MacOS 10.14.6

Additional context
Add any other context about the problem here.

Since this extension is using neovim, i upgraded it via brew to ensure that that didn't fix the issue. Even after upgrading from 0.3.4 -> 0.4.2, however, still get the same error.

Screen Shot 2019-10-02 at 5 57 22 PM

@tjb-wiley
Copy link
Author

I just confirmed that downgrading to 1.10.2 works, so that is a short-term workaround

@haifengkao
Copy link
Contributor

haifengkao commented Oct 4, 2019

same here. actually I get this error by any command, e.g. :nothiscommand

@jpoon
Copy link
Member

jpoon commented Oct 9, 2019

I don't recall any specific modifications we did with neovim over the last release. https://github.com/vscodevim/vim/compare/v1.10.2..v1.11.0

@dreadwail
Copy link

Global file search/replace via :s is also busted with the same error message. Can confirm downgrading to 1.10.2 solves it as well.

@jpoon
Copy link
Member

jpoon commented Oct 14, 2019

Going through the diff, we didn't change anything explicitly with neovim. The neovim npm package we rely on is at the same version and likewise no code change in the interface. May have been our migration to webpack?

@jpoon
Copy link
Member

jpoon commented Oct 14, 2019

It was indeed the webpack change.

git revert 1f80b2d4cc4d4d108acb18d9fca8c49b8891b696

Seems to have fixed neovim.

@jpoon
Copy link
Member

jpoon commented Oct 14, 2019

Ok, that didn't work. Reverting my fix and pushing a new version as my fix completely broke the extension if neovim was enabled.

Anybody have better knowledge on why webpack could be breaking this?

jpoon pushed a commit that referenced this issue Oct 14, 2019
jpoon added a commit that referenced this issue Oct 14, 2019
* Revert "fix: exclude neovim from webpack module. #4126 (#4169)"

This reverts commit 200c17f.

* bump version
@Hultner
Copy link

Hultner commented Oct 16, 2019

@jpoon @tjb-wiley I see a mention of this working if we downgrade to 1.10.2, how would one go about doing this?

This issue have been driving me mad, at first I thought it was my neovim so have just been using neovim directly since the issue appeared but yesterday I experience the exact same problem on a completely different computer/system and at that point I suspected it might be a bug in neovim. Did some searching and found this.

As someone who's only installed plugins via the vscode interface I have no idea where to even start for enforcing an older plugin-version.

This bugs makes vscode unusable for me, I rely a lot on proper ex commands to work, I can't even do a simple sort in vscode at this point.

@jpoon
Copy link
Member

jpoon commented Oct 17, 2019

You have a couple of options:

This bugs makes vscode unusable for me, I rely a lot on proper ex commands to work, I can't even do a simple sort in vscode at this point.

Contributions are welcome! It's definitely attributed to our move to using webpack. Unfortunately, I don't understand webpack enough to figure out what could be going wrong. Alternatively, we can go nuclear and revert the commit...

@Hultner
Copy link

Hultner commented Oct 17, 2019

You have a couple of options:

This bugs makes vscode unusable for me, I rely a lot on proper ex commands to work, I can't even do a simple sort in vscode at this point.

Contributions are welcome! It's definitely attributed to our move to using webpack. Unfortunately, I don't understand webpack enough to figure out what could be going wrong. Alternatively, we can go nuclear and revert the commit...

Would happily contribute but I'm not a webpack expert (merely even a consumer) and have never coded TypeScript so I would barely even know where to start without much guidance.

Reverting the commit sounds like a reasonable short term approach since this pretty much makes nvim-integration useless.

@trkoch
Copy link
Contributor

trkoch commented Oct 24, 2019

My wild guess would be that some kind of build optimization is hitting us here. @jpoon Any luck diffing the compiled scripts before/after the move to webpack?

@jpoon
Copy link
Member

jpoon commented Oct 24, 2019

No. Sorry, haven't had time.

Let's move ahead with reverting the webpack commit. It'd be amazing if somebody could help submit a PR reverting the commit and testing that neovim indeed does work. I'll merge, and can release a new version of the extension.

@rickpr
Copy link
Contributor

rickpr commented Oct 25, 2019

#4217

@jpoon
Copy link
Member

jpoon commented Oct 28, 2019

Thanks. Merged and released over the weekend.

@jpoon jpoon closed this as completed Oct 29, 2019
@eddiecooro
Copy link

This still happens on v1.13.1 when trying to use :g command over a range specified by marks. for example:
:'a,'bg/^/d

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

8 participants