Maintain line type when pressing enter, etc.