Fix to properly update colors for non-native term256 support

This commit is contained in:
ridiculousfish 2012-03-31 17:24:11 -07:00
parent f930303d3e
commit 52070ea577
2 changed files with 9 additions and 2 deletions

View file

@ -166,7 +166,14 @@ static bool write_color(char *todo, unsigned char idx, bool is_fg) {
strcat(buff, is_fg ? "38;5;" : "48;5;");
strcat(buff, stridx);
strcat(buff, "m");
write_loop(STDOUT_FILENO, buff, strlen(buff));
int (*writer)(char) = output_get_writer();
if (writer) {
for (size_t i=0; buff[i]; i++) {
writer(buff[i]);
}
}
result = true;
}
return result;