execution of "colormix(10,0,65535,0);colorset(10); printf("Boo!");colorset(1)" causes the text to come out in green(along iwth the prompt), but redrawing the screen causes "Boo!" to be displayed in black(and restores the prompt to black). To fix losing specified text color requires extending concept of bufflines to track not only the text, but also the color of each character and in redrawtext() group together (up to CHARS_IN_CHUNK)chars of same color and draw them.
execution of "colormix(10,0,65535,0);colorset(10); printf("Boo!");colorset(1)" causes the text to come out in green(along iwth the prompt), but redrawing the screen causes "Boo!" to be displayed in black(and restores the prompt to black). To fix losing specified text color requires extending concept of bufflines to track not only the text, but also the color of each character and in redrawtext() group together (up to CHARS_IN_CHUNK)chars of same color and draw them.