Re-add colors.ansi slicing in generateConfig

- We need to make a clone of this array, because ColorManager mutates
  it.
- We only want to compare the first 16 colors instead of all 256, since
  only the first 16 will ever change. In DynamicCharAtlas, we can pull
  the additional colors from DEFAULT_ANSI_COLORS.

I tested this out by loading the demo and changing the theme a few
times.
This commit is contained in:
Benjamin Woodruff
2018-04-16 09:41:00 -07:00
parent 4a13813941
commit ec96c40fde
2 changed files with 39 additions and 24 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ export function generateConfig(scaledCharWidth: number, scaledCharHeight: number
selection: null,
// For the static char atlas, we only use the first 16 colors, but we need all 256 for the
// dynamic character atlas.
ansi: colors.ansi,
ansi: colors.ansi.slice(0, 16),
};
return {
type: terminal.options.experimentalCharAtlas,