So, I’ve been noticing this for a while now, but a lot of times (not every time) when I am using the terminal in VSCode and start typing, the initial first key press doesn’t get recognized. I just thought it was a quirk and is easy enough to ignore…
BUT…
I have an extension I have authored that utilizes the terminal to execute commands. I have just noticed that (intermittently) when I call the sendText
method, the first character of the string passed into that method also gets ignored.
Given the following code:
const terminal = vscode.window.createTerminal("MyTerminal");
terminal.sendText("cd ..");
I would expect the command being sent to the terminal to be cd ..
, but in the terminal (and only sometimes) it attempts to execute d ..
– which is obviously not what is expected.
Anyone have any ideas?