For the bad edit one, to clarify, I mean, it would "put its edit pointer" at the top of the file and start deleting/inserting there, instead of where it "intended to" which would have been somewhere in the middle, for example.
---
Erroring in that way specifically makes me think the "deleting every line" issue isn't just a visual artifact but ¯\_(ツ)_/¯