Reduce jitter in textbox with scrollbar
Fix undo peformance at the end of a long file

We were unnecessarily falling through the fast path with force=True
which was always the case for repeated undo in a single unit (undoing
lots of backspace, for example). Using list.index() is quite slow if
called repeatedly in such a fassion. Now it seems reasonable in this
case and when searching.