It happens to me as well, and has been driving me crazy too.
I think it's the periodical check for account rewards (to populate the menu bar) and it's probably caused by how I wrote that code. While it's executing the editor hangs and then jumps to the end, bringing along some of the keystrokes with it, and sometimes erasing text that's been written.
It's on the top of my priorities to fix - hopefully this week. The last week I took a much needed break from coding, so I apologize for the late response!
No worries, glad you're on it! Thanks for your answer.
@anomiej I was about to post this bug when I saw your post beat me to it, and this is already on your @jesta massive todo list, Thanks
PS: @jesta could you add a forum sticky for the inappropriate flag issues?