Don't open an edit for unchanged lines, since it moves the cursor and mucks up the undo history when you've been programming cleanly.