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

Can't interact with more than 32660 characters #1726

Closed
silentdragonz opened this issue May 19, 2017 · 15 comments
Closed

Can't interact with more than 32660 characters #1726

silentdragonz opened this issue May 19, 2017 · 15 comments

Comments

@silentdragonz
Copy link

  • 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 or FEATURE REQUEST? (choose one):

Environment:

  • VSCode Version: 1.12.2
  • VsCodeVim Version: 0.7.1
  • OS: Windows 10

What happened:

Tried to delete more than 32660 characters. Nothing happened. Yank doesn't work. dd doesn't work. Right clicking and doing cut works fine.

What did you expect to happen:
Selected text to be deleted.

How to reproduce it:

Select more than 32660 characters with V
Try to yank with y or delete with d.

Link to premade file with exactly 32660 characters. Add one more character to trigger the issue.
https://gist.github.com/silentdragonz/ec940015743309ce082de580deca763b

@Chillee
Copy link
Member

Chillee commented May 19, 2017

Huh. wtf. That's almost 2^15

@Chillee
Copy link
Member

Chillee commented May 19, 2017

I can't replicate this though.

@silentdragonz
Copy link
Author

I don't have another PC to try it on, but I did disable everything except for Vim with nothing else open except that line and it happens to me every time. I first noticed it while removing some old legacy code from a project I was working on and reduced it down to that example. Not sure what else could be causing it as VSCode itself works fine when cutting or deleting it.

@Chillee
Copy link
Member

Chillee commented May 19, 2017

Could you try opening developer tools and seeing if you have an error? I would think it was an integer overflow or something, but we're using javascript lol :)

@silentdragonz
Copy link
Author

extensionHost.ts:285 [Extension Host] error.stack
2 extensionHost.ts:285 [Extension Host] Error: spawnSync C:\Users\garrettj\.vscode\extensions\vscodevim.vim-0.7.1\node_modules\clipboardy\fallbacks\win\copy.exe ENAMETOOLONG
    at exports._errnoException (util.js:1022:11)
    at Object.spawnSync (child_process.js:480:20)
    at Function.module.exports.sync (C:\Users\garrettj\.vscode\extensions\vscodevim.vim-0.7.1\node_modules\execa\index.js:274:30)
    at Object.copySync (C:\Users\garrettj\.vscode\extensions\vscodevim.vim-0.7.1\node_modules\clipboardy\index.js:39:16)
    at Object.exports.writeSync.input [as writeSync] (C:\Users\garrettj\.vscode\extensions\vscodevim.vim-0.7.1\node_modules\clipboardy\index.js:112:13)
    at Object.clipboardCopy (C:\Users\garrettj\.vscode\extensions\vscodevim.vim-0.7.1\out\src\util.js:33:16)
    at Function.putNormalRegister (C:\Users\garrettj\.vscode\extensions\vscodevim.vim-0.7.1\out\src\register\register.js:153:18)
    at Function.put (C:\Users\garrettj\.vscode\extensions\vscodevim.vim-0.7.1\out\src\register\register.js:75:26)
    at DeleteOperator.<anonymous> (C:\Users\garrettj\.vscode\extensions\vscodevim.vim-0.7.1\out\src\actions\operator.js:121:37)
    at Generator.next (<anonymous>)

@Chillee
Copy link
Member

Chillee commented May 19, 2017

Hmm, what if you tried deleting with the blackhole register. Like, "_dd?

@silentdragonz
Copy link
Author

That works as well as disabling system clipboard in settings.

@Chillee
Copy link
Member

Chillee commented May 20, 2017

This could be an issue with the clipboard library, but there's also a small chance we might be calling it incorrectly.

@Platzer
Copy link
Contributor

Platzer commented Jun 7, 2017

Hi, just ran into this problem too! The problem is the new clipboard library clipboardy, does internaly start an executeable on windows and put the content to paste as argument to this new process. According to this comment https://stackoverflow.com/a/28452546 there is a length limitation to start up a process.

Before the change to clipboardy i think we used copy-paste, i didn't look into how they did it but i never had a problem before!

@Chillee
Copy link
Member

Chillee commented Jun 7, 2017

@Platzer Great job figuring out the issue! We may want to switch back to copy-paste instead. Any thoughts on this @xconverge

@xconverge
Copy link
Member

Yep, I will file an issue over at clipboardy, they were pretty responsive last time

@xconverge
Copy link
Member

@Chillee please do not switch back to copy-paste. I switched for a reason. UTF8 was not handled correctly on all platforms. This meant any non latin characters (korean, chinese etc) were copied as garbage on macos and windows. The dev of that plugin was mia for months, clipboardy they address my issues within a few days :)

@xconverge
Copy link
Member

@Platzer great research, it seems very likely you found the root of the issue

@xconverge
Copy link
Member

Ok it is fixed in clipboardy, just waiting on the new release from them and we should be good to go with this!

@xconverge
Copy link
Member

New release of clipboardy, will fix this tonight!

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

4 participants