mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 18:03:37 +08:00
Fix to properly update colors for non-native term256 support
This commit is contained in:
parent
f930303d3e
commit
52070ea577
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user