AdamMaras / vscode-overtype

Because some people actually press the Insert key on purpose.
https://marketplace.visualstudio.com/items?itemName=adammaras.overtype
BSD 2-Clause "Simplified" License
33 stars 15 forks source link

Mashing keys or typing really fast leads to inserted keys. #16

Open cyraid opened 5 years ago

cyraid commented 5 years ago

I've found this out by accident, but I've noticed every now and then while I was typing, my finger slipped and I hit two keys really fast. This resulted in one key being inserted? To test this, try just mashing the keyboard really fast while in overtype mode.

Reproducible?

monkeyplays23 commented 5 years ago

I also have had problems with this I think this is because of key delay. I think the way this program works is actually inserting then delete the next character since VSCode doesn't really have an overtype option (lame) so it is simulated by the above-mentioned action but if there is a delay in the algorithm the delete next character is slower than the key repeat so you could change the key delay to be slower to fix this maybe? This is not a great method because it causes a significant delay in typing as well. maybe need to grab the whole line and wait until the input stops for a certain amount of time then delete however many characters were entered by count rather than one character then delete the next character. It won't seem like "overtype" but it will definitely be faster.

henrik-jensen commented 4 years ago

Confirmation from me. Toggling overwrite, holding a key down, when auto-repeat delay times out, (usually OS-determined/global setting), the auto-repeated key starts to insert instead of overwriting. System: Windows 10 ( c:\>ver -> Microsoft Windows [Version 10.0.18362.720])

henrik-jensen commented 3 years ago

Can't reproduce it with later versions of Vscode (later than 28 mar 2020 version, currently on ver 1.52.1), so it might have been magically fixed by an internal vscode change. Sadly I haven't noticed the version when/if this supposedly "magical fix" (pure speculation from my side) should have occured, but can anybody confirm that it is fixed with vscode ver. 1.52.1 or later?

mcpiroman commented 3 years ago

@henrik-jensen Nope, it still persists on 1.53.0, on Microsoft Windows [Version 10.0.18363.1377]

HactarCE commented 2 years ago

The issue seems to be on this line. Instead of + 1, it should probably be + text.length.