mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Fix to properly update colors for non-native term256 support
This commit is contained in:
parent
f930303d3e
commit
52070ea577
2 changed files with 9 additions and 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, is_fg ? "38;5;" : "48;5;");
|
||||||
strcat(buff, stridx);
|
strcat(buff, stridx);
|
||||||
strcat(buff, "m");
|
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;
|
result = true;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -714,7 +714,7 @@ void reader_repaint_if_needed() {
|
||||||
|
|
||||||
void reader_react_to_color_change() {
|
void reader_react_to_color_change() {
|
||||||
if (data) {
|
if (data) {
|
||||||
data->repaint_needed = true;
|
data->repaint_needed = true;
|
||||||
data->screen_reset_needed = true;
|
data->screen_reset_needed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue