Fix newlines messing up cursor offset.

Fix an uninitialized value in TextEditComponent.