Rewrite the display of text_buffer
(from weechat's dev discussion)
Text_buffer should not rebuild all lines on each refresh, but only what
is will be written on the screen.
Keep a pointer to the message at the bottom of the window (recalculate what this message is, on scroll) and build the message from bottom to top until the top of the buffer.
Also, for colors (on special parts of the line, for example jids, nicks etc), do like weechat does, and stop using shlex for this.