diff options
author | 2012-03-31 17:24:11 -0700 | |
---|---|---|
committer | 2012-03-31 17:24:11 -0700 | |
commit | 52070ea5775d31b308718a31563215ec48638b6d (patch) | |
tree | a5de90bfeaf2cabb31401187a70eecc9cc106081 | |
parent | f930303d3e964af2e6ac31f01daf1bc79a946598 (diff) |
Fix to properly update colors for non-native term256 support
-rw-r--r-- | output.cpp | 9 | ||||
-rw-r--r-- | reader.cpp | 2 |
2 files changed, 9 insertions, 2 deletions
@@ -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; @@ -714,7 +714,7 @@ void reader_repaint_if_needed() { void reader_react_to_color_change() { if (data) { - data->repaint_needed = true; + data->repaint_needed = true; data->screen_reset_needed = true; } } |