I am trying to write a text editor and I am not really sure how to structure the text data. Right now the best I figured out is to hold the text in one big array that reallocates in 1KB steps and is stored as one continuous string, with newlines/tabs and all. It just requires a lot if iterating through the string and counting newlines and such. It still seems like a good idea but I was wondering if you know of something better or how to improve this?