word wrapping caused large refactor
i changed state.text to 1d array for this, but now i'm thinking going back to 2d array is good idea. but instead of ignoring "\n" like before, now we include them.
basically the problem with 1d array is that:
- it is slower to insert and delete characters
- it is harder to insert and delete characters