Implement most of the features of TextField

It's a bit hard to reason about off by one errors here, can we abstract these checks into functions. Maybe, `run.containsIndex(beginIndex)` or something similar.