This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/grid.c b/grid.c | |
index a84a58b..c0082ce 100644 | |
--- a/grid.c | |
+++ b/grid.c | |
@@ -505,6 +505,13 @@ grid_string_cells_code(const struct grid_cell *lastgc, | |
if (!(attr & attrs[i].mask) && (lastattr & attrs[i].mask)) { | |
s[n++] = 0; | |
lastattr &= GRID_ATTR_CHARSET; | |
+ /* Don't lose the set colours on attr reset */ | |
+ noldc = grid_string_cells_fg(lastgc, oldc); | |
+ for (i = 0; i < noldc; i++) | |
+ s[n++] = oldc[i]; | |
+ noldc = grid_string_cells_bg(lastgc, oldc); | |
+ for (i = 0; i < noldc; i++) | |
+ s[n++] = oldc[i]; | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment