Keeping the same cell mode after edits