The error is very difficult to reproduce.
So far I have mostly used Notepad++ as an editor and have only corrected something in the Arduino IDE itself. Today I could reproduce it - see screenshot.
My actions:
Enter for a new line
Enter "pinMode(" , the closing bracket is inserted automatically
Cursor right to enter a numeric value inside of the brackets: pimode() jumps all the way to the right and the cursor jumps to the next line.
When I enter values now, the chaos is there. The input would be added to the line content of the next line.
Hi. I am using RC6, but I have worked my way through all the numbers from RC2 so far. IDE 2.0 is the only one I have on my computer (I also have Notepad++, but mainly I use that to open a separate source file to copy/paste from).
I tried to replicate your issue, and it does not happen here. However, my basic behavior is different than yours. I type pinMode( and the autocomplete puts a closing parenthesis. If I start typing (not using cursor right) I can input TRACEPIN, OUTPUT and the closing parenthesis moves as I type. Then I can press the keypad "END' key to jump over the closing parenthesis and place a semicolon.
I am not sure what gremlins are resident in your installation, but I have learned you don't need to cursor right to fill in some parameters. If it would just suggest a semicolon also, I would be in high clover.
To weshowe: I wanted to understand your approach immediately. But my "demon" doesn't agree with that!
The brackets are closed and I enter the quotation marks (") - without a cursor left. These jump to the next line - see screenshot. The indentation of "Serial..." is also gone.
There is something else going on here that is different in your "demon" cage than in mine.
I just slapped that into an existing sketch to screenshot it. I typed the opening parenthesis and the first double-quote, the autocomplete feature added their mates.
I am running this on Windows 10.
I am wondering if there is some Windows feature that is also trying to make a different change at the same time, or maybe it is an issue that does not show up in Win 10?