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, 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;
|
||||
|
|
Loading…
Reference in a new issue