The VSCodeVim team prioritizes issues based on reaction count.
Is this a BUG REPORT or FEATURE REQUEST? (choose one):
Environment:
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
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!
Most helpful comment
New release of clipboardy, will fix this tonight!