Vim: Can't interact with more than 32660 characters

Created on 19 May 2017  路  15Comments  路  Source: VSCodeVim/Vim

  • 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

areclipboard kinbug statuneeds-more-info

Most helpful comment

New release of clipboardy, will fix this tonight!

All 15 comments

Huh. wtf. That's almost 2^15

I can't replicate this though.

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.

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 :)

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>)

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

That works as well as disabling system clipboard in settings.

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

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!

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

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

@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 :)

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

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

New release of clipboardy, will fix this tonight!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gerardmrk picture gerardmrk  路  3Comments

orn688 picture orn688  路  3Comments

st-schneider picture st-schneider  路  3Comments

elithrar picture elithrar  路  3Comments

spinningarrow picture spinningarrow  路  3Comments