Ide 1.8.19 Suddenly gives an error

I agree. My choice of the word "accidentally" was a poor one. My hypothesis was that you might have intentionally clicked on that menu item, not realizing that doing so would result in code being added to the current sketch.