ok rather than putting hooks into the richtextbox, that process unnecessarily (even if i direct it to exit immediately if i am coloring text , it still checks the messages because the hook is there, and this is where the bottleneck occurs, and it would be to slow to unhook and rehook every time you click)
im going to do one of the following: (get your pencils out kiddies)
A:
make a textbox
remove its border
place it adjacent to the richtext box, at fixed width using code
use the api to get the current pixel in the richtextbox and use mod to shift it appropriately, to avoid that problem where line numbers shift ever so slightly if you use the default scroll.
B:
get rid of the richtextbox scroll bars and replace it with a flatscrollbar and scroll using the api to ensure it always scrolls a full row rather than a row + some unknown number of pixels.