Fix bugs in display list in TextBuffer, still use Nehe's code