There's a very simple algorithm to deal with that. You make a buffer that is bigger than the file being edited. You copy the start of the file to the beginning of the buffer, and the end of the file to the end of the buffer. The gap in the middle is where the cursor is. Then each keystroke by the user is a very quick operation. If the user types in so much information that the gap closes up, then you need to do a buffer expand operation and copy large amounts of data around, but that won't happen very often.
Ah, darn. That'll teach me to comment without refreshing the page first. I refer you to the earlier DonHopkins post.
Ah, darn. That'll teach me to comment without refreshing the page first. I refer you to the earlier DonHopkins post.